Hi there...first of all, from what you are posting I don't think you are gay either. HOCD is real and many people suffer from it. Usually it just takes one little scenario such as your masturbation in front of that guy. It really means nothing other than you were looking for a way to get off and you found something that really wasn't for you since what you really wanted wasn't available.
So here are some tips....
First, stop the internet reserach. Nothing good comes from that and it just heightens the anxiety you are already feeling.
Second, stop second guessing yourself. You know deep down inside that girls are for you so when this "Am I gay" thought pops into your head try to stop it right then and there with positive statements of fact. "I like to masturbate in front of women...not men" or "I have tried that and hated it" Something along those lines. What you don't want to do is sit there an analyze the hell out of it.
Third, you don't just wake up and all of a sudden you are gay. People that are gay know it from a very early age and don't fight it. People who have HOCD, fight the hell out of the thought hence the whole problem in a nutshell. What you have to do is say "whatever" and give these thoughts no credit.
Fourth, stop trying to push it. I'm sure you are sitting there trying to get back what you had with a vengeance. Give it some time. Get some magazines and take it slow.
Fifth, try your best to get back outside with your friends. You need to get yourself out of your head and back to doing what you used to do. Force yourself to go out if you have to. Your life as you know it has not ended. You are not gay (and I have nothing against gay people either). It is just my opinion that people are either attracted to the same sex or they are not. And the whole checking people out thing...it is natural. I still check out other women my age to see if I "measure" up to them. Hell, I want to look as good as the next 47, soon to be 48, year old. So don't worry about that either.
Lastly, if you really cannot get over this, then you can always tell your parents that you are having unwanted thoughts (no details are required). If they ask, just tell them you are worrying a lot about different things and that you would like to talk to somebody. I have a son your age...if he came to me with this, I'd get him some help.
Take care and post again if you need anything.
No I don't think you are gay but you need to seek therapy to talk about this with a professional.
Great professional help...I don't think i can get professional help. I wouldn't know how to ask my parents? Now do you think I'm gay from reading that? Or am i just obsessed with these thoughts?
seek professional help and sort through all this.All the best.