We were in a bad financial bind. I made some stupid choices (forging checks) and got sent to prison. The first week I was there, I was gang-raped. Apparently some guards got bribed to look the other way. I was so afraid this would happen again that I told the doctor I was gay so I would get taken out of general population. Luckily I was able to keep my head down there and got my sentence reduced for good behavior. The queens knew I wasn't really one of them, and they left me alone.
I get out of jail next week. My wife will be coming to pick me up. She has been a steady supporter, coming to visit me frequently and sending me letters, letting the authorities know I was not some stranded convict. I am hoping to start a better way of living.
But I am afraid I will not be able to perform with my wife. I am also afraid that I may have gotten something from being raped. I don't trust the prison doctors. She will want sex right away. (I do too.) But I should get an HIV test first, shouldn't I? Please don't tell me to tell her I was raped. I know she will view me differently if I tell her what happened. I want this to stay private, and keep that memory away from her and me.
Come up with some kind of excuse to avoid sex with your wife until you can see a doctor. If you have to, get her off without putting your cock inside of her. Oral sex and using your hands won't put her in danger of contracting most sexually-transmitted infections (STIs). Come while you are going down on her then apologize up and down for not being able to wait long enough to fuck her. She will probably be understanding. Tell her that you waited so long to hold her in your arms and smell and touch her that you need to cuddle as much as you need to have sex. You can also tell her that it is taking you a while to get used to being out of jail, that bad things happened there which have left you feeling shaken up. If you let her know you need emotional support, she can probably put up with some disappointment at how the reunion got celebrated.
Then go to a public health clinic. There are free ones set up specifically to help people with STIs. You can get an HIV test without waiting to get the results back. There is an oral test now that gives immediate results. The doctor can also test you for syphilis, gonorrhea, hepatitis, etc. and tell you how long you should wait before you can safely have sex again. He or she might simply give you a big dose of antibiotics just in case you were exposed to syphilis or gonorrhea, and that is effective within two weeks or so. Ask your doctor for clear instructions.
There are counselors who specialize in helping people who were sexually assaulted. Rape can happen to anybody. It isn't just a male-on-female crime. Some feminists say that rape isn't about sex at all. I would disagree with that, but my experience helping victims tells me that rape is mostly about power and control. The rapist isn't even necessarily attracted to the victim. They don't have the ability to see some “secret gayness” inside of you. All of the guilt and shame for this belongs on their heads, not on yours. They are the ones who did something terrible. You are a hero because you lived through this and stayed strong so you could eventually go home.
I am truly sorry that you have to carry this trauma in your mind and body. I wish I could tell you that you could disclose this secret to your friends or your wife without anybody judging you. But that isn't true. So get a counselor who is legally required to protect your privacy. Talking about what happened is one of the best ways to prevent this from becoming such a big secret that you develop serious mental health problems because of it.
You are going to feel scared and anxious for a while. Situations that you used to take for granted might be hard to handle. I can't predict what will trigger you. But be patient with yourself. What happened is not your fault. You did what you had to do to survive. And that's a good thing, because now you have a second chance to start over. Just don't let fear or anger get so strong that you lose control and do something that will land you back in the legal system. Your counselor should be able to tell you how to ease up when it feels like the tension is building, and there is no healthy way to release it. Using drugs or alcohol is not a great coping technique because they don't help you to feel better for very long, and they lead to other problems. There is a big temptation to become violent yourself, to prove that you are man enough to take control and put the fear into other people, to make them see you as the one who is powerful. But if you are a decent person, that backfires. It makes you feel small and twisted. Being a good man means taking responsibility for people who are weaker than you, and doing your best to prevent any harm from coming to them. You sound like that kind of person to me, not a perpetrator.
Getting attacked won't change your sexuality. No matter what was forced upon you, it doesn't “convert” you to wanting or liking sex with men. If anything, it would logically have the opposite effect! Some experts believe that sexual orientation is already determined by the time we are small children. Your desire for women is going to remain strong. I hope it won't take long for you to get your confidence back. Knowing you are healthy is a good start. Take it one day at a time. Other guys have gotten through this, and you can too. Someday you won't think about it the same way that you do now. The memory will fade, and you will be so busy with the good things that life offers that you won't have the time or space to trip on the past. But until then, reach out for support, because refusing to get help will isolate you with ugly memories and make them stronger.
I'm also going to put it out there that your wife might be one of those amazing women who can hear the true story, understand it, grieve with you, and become a stronger partner because you were so vulnerable. I don't know what your wife's values are or her character. So you will have to make that decision on your own.