I wonder if in some cases forgiveness needs to be the goal. After leaving an EA relationship of 11 years I was full of anger, and used to have revenge fantasies in relation to my ex. Luckily once I left we never needed to cross paths again and never have.
I realised after a while I was actually more angry at myself. Like you say op, wtf did you/I put up with it ? 12 years on I don't really know why. I have a few good ideas why, a few guesses, the odd hunch. But actually now it doesn't matter. I don't put up with that sort of behaviour anymore from anybody.
It never actually occurred to me that I could or would forgive my ex. I don't want to excuse his behaviour, there was no excuse. I did however chose to move on from that episode in my life. I also now accept that I did what I did because well.........I did !
The best revenge really is to live well. My revenge fantasy turned from punching him in the face after shouting abuse at him, to hoping he'd see me with my partner and our lovely children.
Do you want to forgive your ex to make it easier to forgive yourself ? If that plays a part in it, sod him, just worry about yourself.
Re-reading my post I might sound a little glib, and I know "to live well" can be a bloody tall order at times. However, I just refuse to let that period of my life overshadow the present. I do still have the occasional moment where I can't believe it all happened, but it's all gone, and so's he. I know he'll still be the same sad, mucked up person now as he was then. But that's not my problem.