You don't say if you are sexually active, meaning actively engaged with dating and the like. Erections don't come whenever one is aroused. They are more random than that. It's only useful at any rate if you're about to have sex. What determines if you are gay or not is your actions, not your thoughts, really. If you always date women and never try with a man, you aren't gay. What you are probably suffering from is anxiety and sexual insecurity, which is very common to have at least once in a life. If you're truly gay or bisexual, you will find out because you will eventually act on it. If you're not, you won't. If you do engage in heterosexual activity and it never works for you, you might be gay. But that could also be insecurity and anxiety. HOCD isn't really a thing, it's just a description of obsessing over ones sexuality, and again, most of us do this at some point or another, especially following a bad break-up, but it is something humans think about. Like we think about the weather or whether we think it might be better to be a vegetarian. It's only when our thoughts bother us to the point our lives are disturbed, as yours is, that it's a problem. If it's something interfering with your life, therapy is a good place to go explore it and why you are feeling insecure about your sexuality. Gay people usually figure out they're gay. Confused people are usually anxious. Peace.