Hi Max, Marriages can survive affairs. (Well, I can say that mine did.) Recognize that, although you were the one who strayed, you and your H both contributed to the deterioration of the relationship, bringing you to the point where this happened. I'm not saying you were blameless - but you were not SOLELY to blame either - that's just not how things work.
Everyone here ALL made terrible mistakes that got us to the point where our M's were in jeopardy. However, what those mistakes were, and how you handled them, is not where you should be focusing. Sure, understand what happened and why, and learn from this.
Instead, put the majority of your focus and energy on where you go from here forward. Have you read Divorce Busting or Divorce Remedy? (DR came out later and I think is slightly better - but they are very similar.) If not, that's your first step - get that book and get reading!
Hang in there - you're in the early "panicky" part of this process of recovering and rebuilding. It will get better.
Thread #10 22 year M, MLC, Piecing since 1/07 Goal: Live with confidence & enthusiasm!