You need to speak to an attorney to find out what your rights are, preferably one who is concerned with civil liberties. I am not sure what the laws are where you live, but I will say you were foolish to act the way you did when you socialize and work with kids. Common sense could have prevented much of this, as would not coming out to a family who you surely knew was not very open minded to begin with. I don't know you, so I don't know if you're actually prone to forcing yourself on a child. Without knowing even that much about you, I can only tell you to find out what your rights are from someone who is not going to turn on you, and that would likely be an attorney who has a focus on civil rights. Unless you have been doing some pretty crazy shit, there's no way anyone can force you into a mental ward, nor can they even force you to be examined by a psychiatrist without some sort of legit provable reason based on your behavior. I am assuming you are an adult with no history of major mental problems. If you are a minor or you have a preexisting medical history of psychological problems, then there is more working against you. Speak to a lawyer. And you're probably going to lose your job as a result of spitting into the wind.