I've read a few articles about sexual identity which suggests a child develops their sexual identity by the age of three.
There is however no evidence to suggest there is a 'gay gene' or you were 'born that way', despite a great deal of research (more than 10 years into genetic research), so I can't help but question whether there is a choice in the matter.
I went to an all boys school where there were constant name calling and if you didn't have a girlfriend or didn't have stubble etc, you were called a 'fag'. Even good looking people would be lead to believe they're ugly if everyone tells them they are, so I've no doubt this may have affected some boys. Sexual abuse also can play a huge role in determining sexual orientation. I also know of girls who had relationships with other girls, but ended up in happy heterosexual marriages.
If any of my children were to believe they were gay, I'd start off by reading up on a lot of material about the topic, from both sides of the argument. I'd recommend 'Bringing up Boys' by Dr James Dobson which was quite enlightening. I only recommend this because whatever decision you take, you may have to live with it for the rest of your life. Whatever you choose, make sure your decision is not based on what outside people may think. In other words, do not force your child to be 'straight' because you worry about social dogma, not should you tell your child to be 'gay' because you fear you might be called a 'homophobe'.
That said
CLEARLY becoming angry at them or acting in any non-supporting way is the wrong way to go about doing it. Love your child no matter what as I'm sure you will do. We all just want what is best for our children and I agree with Tom, love them no matter what they choose to do.