I am almost 18 and I think I developed a nice healthy way of living and dealing with emotions and rejection! I'll give you example of a situation I found myself in that some might consider depressing and then how I dealed with it. Check it out!
One of my lady friends that i have a thing for, agrees to go to dinner and a movie with me! (a date) On this wonderful outing she meets some random guy that she starts flirting with in front of me, gets his number and doesn't talk for the rest of the night because she was constantly texting some one. Then after that she ignores me and i rarely hear from her.
Well you see this came as a surprise to me! because up until this point i could not go a night with out her calling me, or blowing up my phone. What I did was to make sure to hide it from everybody so they couldn't pity me (i hate pity), congratulate her when she started going out with some other kid like a week later. This gave the image to her of me being the kind of manly man that cuts down trees in a coal mine while eating raw steak and lifting weights.
So that's pretty much I handle everything that upsets me! Remember all you have to do is hide it, then act like it never happened and you don't care. The only side effects I can find are falling into a fit of rage once in a while, and thinking about "doing yourself in" every night. But when i think of that i just laugh. So what do you think!?
Wow....So you were out with this person and they decided to flirt with another guy right in front of you? I hear stories similar to this all the time. I think generally females are always looking for the most attractive looking guy they can find, and when the opportunity comes, they don't mind pushing you aside right then and there.
Oh and btw, congratulating this person is just pathetic. You need to ignore them completely.