Going to echo what Sandi said. Read about Last Resort Technique. Become a better man - a man only a fool would leave. Change yourself and don't do it for her. She doesn't want to see your changes right now anyway. She is done with the marriage, so the marriage as you know it is over. You will either be starting over with a new marriage or ending this one. Do you know if the affair is still active?
Me:29 W:27 M: 4 years T: 5 years No children S: 7/7/15 EA: 7/7/15 BD/"I'm done": 7/15/15 MC: 7/7/15-8/21/15 (failed) PA: 8/29/15 W Files for D: 9/9/15 D will finalize in 60 days