Since you posted here in Wayward I'm assuming that you were also involved with someone during this "mistake". If that's the case then I'll give you the same advice that has been given to a lot of new WSs: Confess. Right now.
I know that knowing what this cousin of your best friend went through regarding her involvement will deter you but keeping this secret will only harm you. It will eat at you because keeping such a secret is toxic.
If you voluntarily confess to your partner and your best friend that, believe it or not will actually help. Yes, they'll be pissed to high heaven but what else would you expect? You lied to them. But once their anger fades, they WILL remember that you came to them and confessed. They didn't get blindsided by a third party.
It's good that the affair is over. Now to make doubly damn sure it STAYS over, never, ever have contact with this person again. It's what we here at SI call No Contact. (NC).
There are other things you can do but I really don't want this post turning into a book.
You'll get plenty of good advice here. And don't be afraid to ask advice of the BSs here as well. It's their insight and advice that has helped me the most by helping me understand my Hs point of view and what he was feeling at the time.
Oh, and as far as you being gay? No one will really care. You're a human being first. One that is scared to reveal what he's done because of the pain he would inflict.
It takes courage to admit you made a mistake, drunken or otherwise, especially when admitting it will cause pain to someone you care about.
So ask yourself this question: do you have the courage?
I personally think you do. Because you posted here.
[This message edited by Clarrissa at 8:18 PM, September 5th (Sunday)]