Some thoughts:

If you're going to go off the antidepressants, go off VERY SLOWLY. Stopping them suddenly after being on them a long time can trigger a rebound effect where people get depressed again; weaning off slowly (like 10% decrease a week) usually works well.

As for shifting the focus from ex - I did this twice by taking on big challenges. When my ex had an affair, I trained to climb Mt Whitney. When my ex finally left years later, I tackled learning to play the drums. This took me into an adult rock band class where I made many new friends, led to me playing in an amateur band for several years, and led to me touring professionally with a singer-songwriter friend of mine. When you're in the moment, focusing on a challenge, you don' really have room in your brain to obsess over your ex.