There is not an answer to this question.
Reason: in order for there to a method for doing something, the action must be possible.
Seriously, dude, just listen to reason and accept that you're gay. I't a lot easier to be gay and happy than it is to halfway repress all your desires and hopes.
EDIT:
So the guy beneath me is right to a degree. Yes, you do not have to have gay sex. However, even if you don't have gay sex, you are still gay. You still need to live with your desires and attractions. The only way to do that is to accept that you're gay. Acceptance is the first step to moving forward. If you accept that you're gay, you can control how much impact it has on your life.
Humans are designed with both rational and sensitive (or emotional) psyches (or souls). As such, it is not just enough to say, "I'm not going to be gay!" You only have conscious control over the rational component of your psyche. However, in order to be happy, your emotions and reason have to be balanced. You have to give your emotions some leeway. If you fight against them all your life, you're only living half a life.