The gym is a good start, a great place to take out any aggression while doing something positive for your health. Same for this site, helping others is a great distraction, and makes you feel better about yourself.
A for my advice, my system usually goes; get quite drunk, regret this when I feel even worse, then decide to get positive! I do this a couple of ways. Firstly I go on random walks; if you live near a forest or large open land of any sort this is even better, as I find urban walking has too many distractions. I walk to clear my head, and also to see the beauty of nature. I find this puts problems into perspective.
After the walks, both music and movies are both great. I find listening to sad or dramatic(mainly gothic or romantic) music can actually pick you up, rather than make you feel worse. Forcing cheesy pop tunes on yourself never helps! I find that Within Temptation and Evanescence are good for this, and Air Supply for the soppy romantic songs that give me new vigour!
Any movie is good, but horror can help take your mind off things the most, since your kinda preoccupied being scared out of your mind! The Ring, Silent Hill and 40 days of night are ones I particulary enjoy, though of course its a matter of individual taste. Also “dramatic” movies can really help(the likes of Moulin Rouge for a sad ending), since you can empthasise with whats happening, and they get the blood pumping.
Finally, once the worse is over, having 1 or 2 close friends to just talk to (or watch the movies with) can really help you to get over the bad stuff that happens in life. If they are really good friends they might even get drunk with you so you suffer the aftermath together(and to make sure this only happens once, substance abuse of any kind is never good)!
Hope that helps :)