Hey, i had a similar coping problem in college. I was mostly okay in the weekdays because i was around people. Going back to my apartment made me feel lonely, bored and depressed. Now i have learned how to really improve the experience a bit.
Basically the first thing is to keep busy with something you would enjoy. I like writing and love reading books. I also make it a point to take walks, call up a friend or cook a meal. A working friend also coped by volunteering on Saturdays and doing photography on sundays.
I think the trick is to make sure you dont get nudged into that negative spiral. I get the whole “heal thyself” stuff but seriously speaking, the mind can either be completely cooled down by years of meditation and when you really move on about the issue or it has to be forced into staying mentally occupied during those free times.
I would say plan your free time better. Watch good movies, read books and hang out with friends outside. Its nice to keep reading articles and having positive affirmations but boredom is the mind’s greatest enemy in terms of propelling negative thoughts further.
As for your ex, all i can say is that give it time and put his mails on spam or junk folder or whatever possible. Write down all the feelings somewhere, shout it out loud and then just go for a brisk walk. Believe me, that cools you down.
Think about what works best for you.
Good luck!