Firstly lemme tell you that I have never been into any kind of relationships. I am straight, I do have emotions and feelings, but I control myself, but I am in a position to help you get a good sleep, because I have also cried a lot.. not because of girlfriends and sex. but because of failures in all walks of life for a long time. though I haven't achieved success yet. I am now stable and very confident that I would be able to clear all this crap in my life and live happily.
Now coming to your solution, You were having sex for at least 7 years, it is not easy to forget someone you loved.. agreed. But you have to move on.. you also don't want to date someone else.. and also that girl is not going to come back.. then the solution is simple either masturbate or get paid sex... Because unless you satisfy your sexual needs, you are not going to get sleep and also not able to concentrate on your work.. the solution is within you only.. or you will have to develop some hobby or something.. to quit your addiction.. do some physical activity.. to get good amount of sleep.. crying is not the solution.. think about your parents, do something for them.. In SHORT, you have to move out of your break up.. take help of some close friends.. hang out with them.. see gfs, sex