I could be way off but you give off the impression that you've liked this girl for a while and you're just finding out now that she has a boyfriend. That's the only reason why this is so difficult for you. You've built this up to be some amazing romantic relationship in your head, and now that you discover she's unavailable, you can't picture anything else besides the fantasy in your head.
When meeting girls, it's best to find out as soon as possible if they have a boyfriend or not, you can do this by directly asking them or by simply making your intentions known. If you make them aware that you like them, just by being extra flirty or anything that sets off their radar, then they'll either tell you that they have a boyfriend, or play along because they like you.
The sooner you discover what the situation is, the sooner you can pursue her or go onto the next girl. In this situation, you seem to be attached to this girl. But just keep your eyes open for others, and when you meet a girl you like, find out what their situation is immediately and take it from there.