I've spend a lot of time thinking about affairs and the hows and whys, having been through a very nasty break up involving an OW, and trying very hard to find some peace of mind if not forgiveness, for my own sake (I dumped him immediately).
OP - for some perspective on what you are facing...it's been 3 years, I now have a new DP I'm happy with, I don't regret the ending of the relationship with ex, but I still wake up some nights at 3am going over and over it in my mind and feeling fucking furious.
It's not the whys that are important. Or even hard to work out. Whys are usually very simple and straightforward - lust, ego, selfishness, cowardice about ending relationship, finding it difficult to communicate with partner blah blah.
It's the hows that utterly destroyed me at the time, and get to me now. It's the hows that have been insurmountable for me to forgive.
You see the whys are always there, for all of us. We all look at people and find them attractive, we all feel lust, we all like our ego stroked, we can all be selfish, we can all be cowardly, we all find it difficult to communicate sometimes with our partners. The whys won't ever go away.
It's the hows that matter, and I'm sure matter a lot to your wife.
The hows are the difference between feeling the influence of the whys and still not cheating, and acting on them.
How could you do what you did? How did you bring yourself to look your wife in the eye and lie to her when you were off with OW? How did you manage to kiss and fuck OW and then go home and kiss and be affectionate to wife? I like to think most people aren't capable of that behaviour - but you were. How? If you are capable of doing those things, why are you suddenly not capable of doing them again?