I am so sorry this has happened.
Apart from losing the object of your affections, you've lost him to someone else, so hurt and a self-esteem battering, a lousy combination!
You need to take time to get over this. Be nice to yourself. What ever you enjoy - movies, chocolate, lie-ins, indulge yourself, but keep it in proportion.
This awful feeling will fade, so give yourself some time, and remember, although this man may not be the one for you, that doesn't mean he is the only one - you will make other friends, and someone will come along when you are not looking.
Take care of yourself, and don't let this get too much for you. There is always support on here, so keep posting.