Dusty I imagine none of us would expect you to be capable of turning your feelings off like a tap and so it's understandable that your heart has got to catch up with your head.
I just don't want you to think that by improving your relationship (if you get back together) that this will solve what is actually his problem. At the moment, your joint belief that he wouldn't have done this if your relationship had been great, is comforting, I know. This is because you feel you would have some control in the future, to stop this happening again. But as I think someone said earlier, he's the only one who has only control over his own behaviour.
I'm afraid I think that it wouldn't have mattered what your relationship was like, he would have done this anyway. He would have been tempted by another woman and because he didn't learn any lessons last time, would have thought that having an affair wasn't so bad. He didn't want you to find out and you were shocked to the core when you did. He must have been a very skilled deceiver, over 18 months.
Unless he works on his own boundaries and has a shut-down mechanism in defence of the prospect of a romantic interlude, it won't matter how great your relationship is in the future. This is so evidently a problem with him personally.
Look at it this way, it sounds as though you were even unhappier than him in this marriage. Would you have had a relationship with someone else?