I was lonely for the first 26 years of my life and I was ok with it. I always had a negative view of women. I never approached women

After my first short term "relationship" I realized all my views were wrong and I ended up messing up that relationship (which sent me into a deep depression).

I now realize how lonely I really am and every waking thought occupies me getting a girlfriend.

How do you deal with something like this? I am making attempts at going out and I know I'm supposed to be happy and only then will I attract someone, but this is something that is like a monkey on my back and literally affecting all areas of my life.