Of course the fact of being gay, and the fact of being affected by a mental illness are not the same, being gay is not a mental illness or a physical illness, or anything of that kind, what is similar is society's reaction to the two states of being.
A gay person is, most probably, born that way, and it is part of the normal spectrum of behaviour in practically all living things, it is not an illness.
Many people find others being gay offensive, stereotype such people, sneer at them pillory them and demand that they change, which they can't.
The stereotype of the gay person is of a promiscuous person who is set on preying on innocent children, and individuals in a attempt to "make them queer."
A person, like myself, is born with a tendency to depression, there is a lot of it in the family, society thinks that people such as myself are weak, feeble, disorganised in our thinking, and responsible for our conditions, they demand we change, "pull our socks up," "snap out of it."
That we change, become "normal," which we can't.
The stereotype of the person with mental health difficulties is that they are the "mad axe man, with staring eyes, coming to bludgeon you to death."
Both of these situations in life, dissimilar though they are are are condemned by society, whilst being so regularly apparent that they are commonplace.
This is the way I see them as being similar, not that I was equating homosexuality with an illness. An illness can make you feel terrible, there is nothing about being gay that should do that to you, but societal attitudes, may attempt it, unless they are shown to be wrong and misguided.
All difference in nature has to be accepted and understood if we are to create a better society, but of course really dangerous individuals like Eric Harris have to be prevented from harming others. It is not helpful when society insists that all mental disability and difference is the same, and is the fault of the person so affected.