Oddly, it is normal and healthy to feel this pain. It's good. It means you've lost something that was worth having. And that's great - it means you have had three good years. Be happy about that. :-)
And you've recognised you are in pain and that you need to make it get easier and acknowledged you need to move on, which is a huge step and is really good.
Firstly, do not debase yourself, such as going with a prostitute, as suggested. All that does is take your mind off it by making yourself feel dreadful about yourself. That's a crap way of dealing with life.
Contrary to standard advice, I would suggest you remember the good times you had with her and forget the bad times. (Someone else gave me that advice when I thought my world had ended when my first love dumped me and, with hindsight, it was really good advice.) Be pleased the good times happened and take heart in knowing they can happen again with someone else.
These three years, like doing a degree, have been an important and valuable part of your life in which you learned things about yourself and relationships. You invested time and energy to make it work and, for three years, it did. So that is all good and is something you will always be able to take into another relationship.
As for feeling jealous of your ex with someone else, that will ease with time. One way of dealing with that - and it is very hard to do - is to be happy for her. She may be on the rebound, she may have made a mistake dumping you for him, she may have found the love of her life. But, it is no longer your business. You no longer have any responsibility or authority over her. She has made a life decision for herself - respect that and let her go her way. Releasing someone is tough, but it is the lover's way. If you really want her to be happy, let her be free.
Which, in turn, makes you free too.
You have been released.
You are now entitled to be the life and soul of the party. :-)
So don't mope. Go have some fun. Nothing serious, just be frivolous and start socialising again. Now you know you can hold down a relationship for three years, you can feel validated and be confident you can do it again.
And if she sees you out and about and being happy, she'll feel a twang of remorse, which is nice, but she will also stop feeling guilty and she'll be able to get on with her life too.
~ ~ ~
That was the daytime advice.
~ ~ ~
At 3 a.m. when you wake up and find you've been crying into the pillow, concentrate on the happy times you had with her. Enjoy those memories, cherish them, memorise them. They are yours forever. Focus on them and before long you'll be grinning to yourself and going back to sleep.