Similarly, your employer can fire you if there is no reasonable accommodation for your medical condition that you are willing to accept. If, for example, you have a treatable form of schizophrenia but refuse all medication, you can get fired if that condition renders you unable to perform your job duties.
You can get committed to an institution, or your employer can be forced to reinstate you, but absent such an order from the legal system, you are free to refuse treatment, and your employer is free to let you go.
You can't quit the game. I assure you. Might as well make the stand here and now, because in the end, it will find it's way back to you. People problems always do.
even if involuntarily committed to a mental institution?
Most states define laws of their own around this, and usually a longer involuntary stay requires a court hearing. But I wouldn’t be surprised if even those are operating in a legal gray area that would get shot down upon a SCOTUS hearing. More realistically, the Supreme Court wouldn’t hear these cases due to higher priorities, but I think the “right to liberty” has only very few exceptions.