If you want her back then there is always hope. You have to want to change whatever in the relationship that allowed for an outside sexual relationship. It is impossible of course to say how long they will be together if at all. It depends on a lot of things. Are they in love, what caused her to seek outside relationship, is she still in love with you, what are the positives and negatives of both relationships. All of this plays a factor. You have to decide if you see there is hope. Under the right circumstances she may still want a marriage. Find out how connected she is to him and what she is willing to do. Is she willing to work on things. I would offer to go to a couples counselor with her if she is willing. This would show that you are willing to change and want this marriage.
As far as your children, you would have to consult with the court on that. You should find a way to maintain consistent visitation. Also keep as much as the marital conflict away from them as possible. You should want to see your children.
Please press accept; this is the only way I am compensated