Homosexuality is a spiritual condition and can only be overcome spiritually. Did your friend ever try religious salvation?
Funny you should mention that, he was very religious, much more so than me. He still goes to church often. That's just one of the reasons why it came as such a shock. The other weird thing is that he used to rail against homosexuality often. I spoke to him about that and he said he thought that it would somehow help change who he was if he purposefully tried to be homophobic. It a weird kind of way it made sense to him at the time.