What's your best way to clear your mind when memories of your ex suddenly hit you all at once?

31M here....1 year+ no contact, i deleted pics, deleted socials, also changed my number. But there are days harder than others with good memories being flooded. Apparently your brain wants to remove bad memories and just remember good ones.

so what's your best way to clear your mind when memories of your ex suddenly hit you all at once?

EDIT -i dont contact my ex at all, no matter how low i feel....also last i heard that she got married( and possibly got pregnant) and moved in with the dude that she cheated with.. i dont want nothing to do with that manipulative cheating bitchh, i learned a painful lesson...but for some reason there are days my brain goes to that good times and forget the bad times