Welcome to SI, Flashman
Turns out, I lost the ability to be a kind person. I was selfish, mean, angry at everyone, self-centered, vain and just an asshole to my wife and son.
While I was away, about 18 months after the stroke, my brain created new pathways for me to be my pre-stroke self. (at least that's how I understand it to be)
These two statements stood out to me personally, as I experienced something very similar in my life and as part of R after infidelity, and I'm wondering if what you went through is for similar reasons?
I experienced severe emotional abuse, molestation and neglect as a child. I never really thought much about it in my adult life, and I felt well adjusted and fine. 6 years ago, all that crap I had compartmentalized as a kid, just kind of "exploded" in my head, and I had a breakdown. The thing is, when that happened, I changed. Like you, I became a mean, angry asshole, which was so very opposite of the "me" I had been (or at least how I saw myself). It was in this state that the affair occurred to begin with. And afterward, it made R almost impossible for us, because I was stuck in that mode.
After a great deal of therapy, hard work, and patience from my wife and family, I was able to begin to turn that around and find the nice, loving, decent parts of myself again.
For me, it turns out, all that abuse as a kid taught me to disassociate, and "go somewhere else" or "become someone else" when bad things happened. In a way, it is similar to having multiple personalities. Imagine that all your emotions... love, hate, joy, anger... imagine that those pieces of you split apart into two (or more) personalities. One of you got love and joy, but not anger and hate, and vice-versa. When the love and joy part is in charge, you become "Mr. Nice". When the anger and hate guy is in charge, you become an asshole. It's sort of like that. With LOTS and lots of therapy, years worth, I am finally able to begin integrating those parts of me, becoming "one person" capable of a range of emotions.
If any of this is ringing a bell for you, then perhaps talk with your IC, and see what they think? For me, it is a whole new world. I needed to deal with that pain and trauma, and my soul is crushed knowing that I allowed my personal trauma to affect me in such a way that I passed that pain onto my wife and kids, but "fixing it" was something that needed to happen, regardless of the state of my marriage, or it would continue to haunt me and everyone in my life until it was dealt with.
One last thing. Bear in mind that, regardless of your state of mind, Mr. Nice or Mr. Asshole, some part of you still chose to allow the affair to happen. I say this to you only because I found myself trying to dismiss my actions as part of my emotional state. It was avoidance really. The truth is, whatever emotional state allowed us to have an affair, is still part of us, no matter who we are, and so it needs to be acknowledge, understood, and dealt with.
It is good that you are here, asking questions, and making the effort. SI can be a tough place sometimes, but it is tough in a good way. More than anything, we WS's need people to be honest with us, and not be afraid to point out when we're blowing smoke up our own asses, or when we're making progress. You will get honesty here, and sometimes, you will get virtual 2x4's thrown at you. Take them all, and learn to appreciate them, and grow. Figure out what inside of you is broken. The marriage cannot possibly survive until you become a safer person to be with, and until you know who you and are in control of who you are. So worry about that first.
In short, go figure out WHY you are who you are, and WHY you did the things you did, so that you can make purposeful, positive changes in your life. And keep coming back and sharing, especially when you don't want to the most.