You sound just like my friend, he's gay too. Unfortunately he has depression issues and social insecurities and I have helped him through it somewhat. When he first told me that he was gay I wasn't the nicest person towards him because he was gay, but he continued wanting to be my friend because we are best friends. So we argued constantly over it for weeks, but it taught me about their side of the story and I learned to be open minded and accepted him for who he was. We're even better friends now.
Don't think too much about it, it only makes it worse. My friend would have better advice than me, and he would love to hear about somebody else who felt like he did.