Oh dear. Well first thing is to take yourself away for 10 minutes and have some alone time, whether that time is spent having an epic cry or punching the living shit out of an inaminate object(dont harm living things unless its a spider). Then you re-gather yourself and begin taking rational steps forward.
If you wish to, and as long as it isnt harmful, continue a line of communication with this fella, but always be rational and if you feel yourself getting overwhelmed then just stop, make an excuse to leave and don’t let it get out of control. I will never advise you try the romantic 3-point play and try and steal him as that move in this situation is wrong and immoral.
Over time you will begin to lose the intense feelings you had and they will not be as noticeable, this however does not mean you are off the hook. If you find subtle reminders of his existence set you off, remove them, and carry on rationally. If when talking with him the topic of his gf comes up(and it will, because murphy and his law will enjoy taking the opportunity to fuck you up) then, and I cannot stress this enough, stay calm, humour him with simple answers for 5 mins max and then change the subject to something as far away as possible and move on.
Im sorry that there is no way to magically go “sorry you cant be with her you have to be with this girl” but I will say that Mr Anon Right is on his way, and he’s coming as fast as he can