Nature walks/hiking
Clubbing & hooking up with someone new
Hobbies
Hanging out with friends
Setting new goals (i.e lose weight/bulk up, get a better job)
Basically, anything that will divert your attention from them, and help you to regain a sense of independence.
Listening to music that relates to your issue. It always helps me to listen to Adele etc. People who've been thru it and express it in song and have grew from it
don't hook up with anyone new!
Find a new friend. Honestly this works the best. Just a friend, no romantic interest, but a friend and don't nag them about your heartbreak.
Working out apparently works too idk
I hate to be a pessimist but I never really found a way to deal with it. Eventually as time goes on the memories just fade into the back of your mind and you make new ones, hopefully with better people.
Take the time to feel sad/depressed in a healthy way. Cry the **** out of you until you you start getting over the habit you were used to, the things you used to do with that person, and stop overthinking.
Live your "mourning" for a few days and then you'll be laughing about this.