Every couple months I'll have things that I randomly remember when my boyfriend had sex with a lot of people... and one of the gross ones were when he was 18 years old he had sex with a 40 year old woman and the more I think about it.... the more grossed out I get. How do I get past this?

I also feel like I am doing better and as soon as I make progress I am back to being depressed about it and thinking about it constantly. I really need advice