Don't know what to do

I was dating this girl a while ago, she is the only girl I have ever slept with and she ended things with me because I couldn’t stay hard. I have basically turned into a shell of myself since this happened, I don’t enjoy anything, I can’t think straight I feel disgusting all the time. I can’t even let my hand touch another body part to even scratch an itch or anything like that without feeling uncomfortable. I’m not sure what the point of sharing any of this is but I need to get it off my chest and I’m not about to tell anyone I know, basically I feel disgusting and life just hasn’t been very good for a while