I'd suggest that if you haven't done so already, that you quit discussing your relationship. The waters are far to muddy with OM to even try to make heads or tails out of it. It probably goes without saying that you weren't the perfect husband, because it's impossible to be, just like it's impossible that she was the perfect wife (you might want to take off any rose-colored glasses you might have donned after discovery of the EA).
There are only a few things you can do, and they all involve YOU. Work on your faults without going over the top or making sure she notices. Look into some things outside the house that interest you, just to get a little space. Realize that she's the only one that can make the decision on whether she'll try with you or not, and she won't as long as OM is in the picture. I personally wouldn't believe her on the "I'm done" issue. You could confirm she isn't done with one of those keylogger programs. It won't help her to quit OM, and it won't bring her back to you, but if you see no success, it could help you to understand why not. I'd probably wait and see for a bit, but if she gets more aloof, I'd install it. But you have to know what you'd do with the information. Would you kick her to the curb?
You cannot be lonely if you like the person you're alone with. Dr. Wayne Dyer