There's more than one script, in my experience. There are lots of common themes, but they can come in all sorts of combinations so that no two stories are exactly the same.
Plenty of closeted gay men have a series of female partners. As a PP said, it's often to hide and convince themselves/others that they're not gay.
My ex made me feel worthless. I was constantly trying to live up to his expectations and constantly failing because I wasn't the right sex for him.
I'm not sure I'll ever "get over" my partner of 19 years being gay and lying to me for all that time. He shattered my confidence.
Counselling really helps. Don't put it off. I also find it helpful to try to focus on the fact that, regardless of the reason for our separation, I am happier now. I had DC with mine and I can't help feeling that he stole two decades from me. Can't even look back and tell myself he loved me in the beginning because he didn't. He was watching gay porn and fantasising about coming out.
Not having proof he's gay can make you feel like you're going mad. My ex has a male partner now. But because he's never told me he's gay (DC refer to him as gay, so think it's safe to say that's how he identifies) I still feel some hurt and anger about the way he went about things. I mean, FFS, he's never acknowledged to me that our marriage failed for a reason completely beyond my control.
OP, you can check out Our Path (based in USA, big organisation, website and Facebook page, lots of podcasts), Straight Partners Anonymous (based in UK, anonymous, private forum) and there is an Australian lady who does online counselling around this and also has a Facebook page and website you can visit called Not My Closet.
To be honest, if you heard some people's stories, you would probably count yourself very lucky to have gone on to a new relationship not have had children with your ex.