Alright, so first off there's a stickied thread called "Something Bothering You?", this type of stuff definitely goes there. Don't worry though your new, you'll get the hang of things.
Now to answer your question. Well it's only natural to feel bad after that, and there are many ways to keep from feeling ****ty. In my opinion never go for another guy/girl after that, I feel like your just using them as a rebound. That's not always necessarily true, but it's just not good. But that's my opinion. Keeping busy and doing constructive things always seems to help. It keeps your mind on the task at hand and doesn't let it wonder. When your sitting there doing nothing your mind begins to wander and it will always go back to that.
Personally, if I ever don't want to think about something, I always start to draw something near me. Weird habit, but I've filled a sketch book or two with trees. So it's up to you though.
Hope everything gets better for ya.