OP, don't listen to some of the arseholes here.
Good people have affairs as well, but they have to make themselves feel better by pretending that only arseholes do it so they can feel safe in their own marriage. Of course cheating isn't right but it happens with people from all walks of lives and can happen to the judgers as well.
I'm sorry you got hurt, but well done on ending your marriage. Leaving aside his behaviour, you left him when you formed an emotional attachment to someone else, which is pretty much always advised on here. Leave your husband or cut contact with the person you are in an emotional affair with. You did that, but that isn't enough for some.
If he was cheating on you then you don't really own him your fidelity do you? Surely at that point your marriage vows were completely broken and you owed him no loyalty back.
My ex financially controlled me. He got me into huge debts which I didn't find out about for years. He betrayed me in so many ways, so many promises he broke. Yet, when I had an emotional affair I was the arsehole
I did feel like an arsehole actually, and I still regret that I turned into a person capable of cheating, but never was his behaviour scrutinised or looked down on, just mine and he betrayed me for bloody years, which caused just as much damage and hurt but who cared about that because an emotional affair is the worse thing in the world!! (By the way we were very close after we divorced and put it all behind us but I still get annoyed by how I was judged and he wasn't)