My partner cheated...

I’ve been with my partner for 3 years theres loads of backstory but basically, he was with another women his childs mother. (Which i knew nothing about) when i finally fount out, i spoke to her and told her everything. She ended up kicking off with me, and stayed with him (to get at me) me and my ex at this time remained in contact the whole time. We got back together and he said it was all over with her, then i fount out recently around the time we got back together it happened again (this time she knew about us being together) she sent videos, screenshots everything. I decided after it blowing up to stay with him, we live together, puppy and I’ve recently had a miscarriage. But i just can’t stop thinking and obsessing about everything, to the point I’m driving myself insane and I’m so down and depressed. WHAT DO I DO😩