I've been there falcon, and felt the same when someone I've fallen for falls for someone else. At at those times I didn't have the support of a girlfriend so I took it quite hard.
I've dealt with it poorly on a couple of occasions, by engaging in self-destructive activities and justifying it by telling myself that everyone else does it.
However my most recent ex found a new man around a month ago, and this time, just before going socialising with both of them, I made a conscious decision to focus on my desire for her to be happy, regardless of my own feelings. I expected to have a lot of difficulty maintaining that positive outlook but to my surprise I didn't experience
any feelings of hurt or jealousy. I met her boyfriend and felt that he's a decent guy and I truly felt happy for them both.
Interestingly that same girl was also going out with a close friend of mine in the past, and at that point in time it was easier to deal with feelings of jealousy because I was good friends with both of them. So I agree with Scott's advice