This process is known as an Emergency Detention in most places in the USA.
Usually it requires that someone you know get a doctor's statement and then go to a judge and get a court order. It take three parties. The third party under unusual circumstances can be a hospital-employed medical person, lay minister or a social worker. The court order is good for only 48 hours and it must be renewed for you to be detained longer.
One who finds theirself detained under such an order should be especially careful to appear rational and cooperative. If you get violent, you will end up in 5 point restraints in an observation area. A doctor must write an order for restraints every 24 hours.
This means that you will see another doctor the next day who decides if you need to be restrained again. If worse comes to worse and your condition is critical they may just give you a paralytic medication and stick you in the ICU on a respirator for a while.
Do not offer any information and watch how you answer questions. You may be able to find an attorney who can get you out the next day on a writ of habeus corpus, but you should have arrangements with that individual before hand. Attorneys wil not usually come in right away to vouch for you unless you pay them BIG BUCKS.
Mostly it is through local a court that has jurisdiction that such legal actions are filed, although most hospitals with psychiartiac wards have a judge that they usually can call at home and a psychiatric nurse or social worker who takes care of getting the doctor's order over the phone and calling the judge and next of kin.
If you hope to have an alteration done in such a clandestined manner (and I do not recommend it!) be sure to plan for every eventuality. If you call an EMS then you will have to find a way back home and someone to care for you. Living wills and powers of attorney are certainly something that you need to consider unless you do not mind becoming a vegetable on life-support.
A medical facillity will not discharge you unless they are satisfied that you will have a care-taker present to insure that you can be brought back to the facility if you should worsen after discharge. If you should go somewhere and then die because your treatment was not completely adequate, they are legally (and morally) responsible.
In other words, have somebody that you know who can be shocked, or at least feign being shocked, that you would get this done who will come and get you in the E.R. They should be willing to stay with you or to let you stay with them as long as is needed. They should not be there either before you get you whatever done or they should not be around when the EMS comes to pick you up after you call 911.
Planning and timing here are critical if you are to survive a botched-up job. Also remember, once those things are cut off, they will never grow back! (Some may consider that a blessing, 'eh?)
Remember, nobody can force you to make out a police report. Falsifying a police report can get you jail time. If you are not an excellent liar and a consistant story-teller the best thing is to offer only a "no-comment" approach. The police will be called and they may give you a hard time but be insistant that you have no statement to offer. After all, you are the victim, aren't you? Whatever you do do not talk to any news media.
I cannot believe that I am posting this telling you all how this works!

A-1
