How do you feel more confident in yourself and stop believing that you're trash & don't deserve anyone? Also, just feel like you're not enough?

I have this problem badly probably because of my bad experiences with girls and I don't have many good experiences with any girl? When I see a cute girl I usually shoot them down mentally because I think that they will never like me but a couple of friends I do have all say that I have a winning personality and I am already good enough to get a girlfriend. Also, feel pretty bad that I'm still a virgin at 27 and don't really date much. All, I do os just work, sleep, and play video games or hangout with my friends when I can.
How do you feel more confident in yourself and stop believing that you're trash & don't deserve anyone? Also, just feel like you're not enough?
Post Opinion