The last sentence is key. I don't think it all revolves around sex, it's just that it's the most obvious feeling, which cannot be easily repressed.
The way you talk make it sound a lot like my own internal monologue when I was depressed. I predict that even if you do find sexual success it will not fill the hole (pun semi intended).
I think you need love, and at this point even the most superficial semblance of love will seem like a cup of water to one crawling through a desert -> hence your focus on the sexual bit.
You somehow (and this is not as trivial as it may read) to learn how to love yourself. It's not an easy task. An important step is making changes, by moving anywhere, keep moving towards slight improvement.
You may run into someone that you can convince of loving you like you do yourself in the long run. To keep in the metaphor, you first need to get yourself out of the desert. Take a sip of water if the possibility presents itself, but unless you get out of the depressed state you won't heal significantly.
It's not easy, I've luckily found someone to share my road with, which makes things significantly easier. I hope you'll manage the same. Get a move on, however tiny the steps.