Bad stuff happened, bad stuff. This happened 4 or 5 times now. When I'm masturbating, right as I am finishing, an image of a guy goes into my head. Can you turn gay from this? I don't like it. It happens randomly. It's my anxiety, it puts bad images in my head. This happened and I don't want to turn gay. Will this make me gay? I didn't want it to happen. It's not fair. My anxiety got worse too. I can't think straight. I feel terrible. I have at least three anxiety attacks a night. What if I turn gay? I don't want to. Help!
You can't be turned into a homosexual against your will, but you can be tempted.
James gives the details on how sin happens: "But each one is tempted when he is drawn away by his own desires and enticed. Then, when desire has conceived, it gives birth to sin; and sin, when it is full-grown, brings forth death" (James 1:14-15). Everyone has normal, natural desires: a desire to eat, to sleep, to be liked, and, yes, to have sex. Satan uses these desires against us by placing us in situations where it appears that to get what you desire, you have to break a law of God -- that is temptation ("enticed" in this passage). When we start accepting that it might be all right to break a law to get what we want, at least in this case or at this time, then we fall into lust ("desired conceived"). Eventually the opportunity arises where we can act on what we think is acceptable and we sin. Sin rarely remains a one time event, and when a person sins repeatedly he gets harden to the guilt. Soon he thinks he is justified to sin, which is called licentiousness -- having a license to sin ("sin full-grown"). Of course, at that point a person no longer wants to give up his sin, and so he dies spiritually.
Let's use a more neutral example. Hunger is a desire; it is neither right nor wrong. Temptation is when you are in the convenience store and see a candy bar, but realize you don't have enough money to pay for it, so the thought crosses your mind that you could just take it. Lust is when you tell yourself that the store can afford to lose some items and that they are expecting some loss, or telling yourself that you could pocket it now and pay for it later, and you accept that these are adequate justification to steal. Sin is when you walk out with the candy bar without paying for it. Licentiousness is when you think it is fun to take things off the shelf, even though you have adequate money to pay for it. From there it is a short step to spiritual death.
What you are facing is temptation. Temptation doesn't make you a sinner. The person who has the idea that he could walk out of a store without paying for an item is not a thief. When he starts justifying it in his head, then he has committed the sin of lust -- which is bad in and of itself -- but he hasn't yet become a thief. "For from within, out of the heart of men, proceed evil thoughts, adulteries, fornications, murders, thefts, covetousness, wickedness, deceit, lewdness, an evil eye, blasphemy, pride, foolishness. All these evil things come from within and defile a man" (Mark 7:21-23). It is when he walks out without paying for something that he becomes a thief.
Satan is trying to get you to accept homosexuality by playing on your fears. He hopes you'll decide that you are homosexual without ever dropping your pants because once you decide you are something, you won't fight it any more. He is being really sneaky by slipping in thoughts of guys at the most inconvenient times. Yes, he doesn't fight fair.
But the point is that just because you are being tempted, it doesn't make you a homosexual. "No temptation has overtaken you except such as is common to man; but God is faithful, who will not allow you to be tempted beyond what you are able, but with the temptation will also make the way of escape, that you may be able to bear it" (I Corinthians 10:13). The proper response in this case is to reject the idea. "Therefore submit to God. Resist the devil and he will flee from you" (James 4:7).
You are a guy. You know that your penis is designed for sex with your future wife. That is the truth and Satan can't change that against your will.