When stuff like this happens to me (well, actually, just severe rejection really) I always play basketball. When I was practically together with this girl for like 6 months (we were tight) and then finally asked her out officially and she shot me down, I played basketball for like 2-3 hours every day for about a week. I felt a lot better.
Kinda funny...I have a craptacular track record with girls...so now whenever I play really well, a few of my friends ask if I've been rejected lately. Really sucks, because usually I have. I don't know why, but when I get rejected, I play really well (even the same day, not after playing like a madman for a week)...and they noticed this! :Q
Anyway, you're lucky you two were together for so long! I don't really have much other advice besides trying to take your mind off of her and trying to appreciate and feel happy for the time you did have together.