It depends, I suspect, on which of the United States you have in mind.
According to Wikipedia, all of the states which had statutes criminalising suicide have repealed or amended them. But suicide was originally a crime at common law, and there may still be an argument, especially in jurisdictions which never dealt with the matter by statute and therefore had no suicide statute to amend or repeal, that it still is.
Completely different question, since being committed as an involuntary psychiatric patient has nothing to do with whether you have committed a crime.
Rules vary from place to place, but in general mental health laws allow involuntary committal on the basis of a two-part test. First, you must have a mental illness. Secondly, you must be a danger to yourself or others. (Plus, of course, there is a procedure to be followed.)
Somebody who attempts suicide is clearly a danger to themvelves, but is not necessarily mentally ill. Somebody who is mentally ill, and who attempts suicide, can probably be committed in most jurisdictions.
I read in the old days the illegality of suicide or attempted suicide was used to force people into mental health clinics. In other words, the judge gave you a choice, go to therapy or jail.
When my first attempt at suicide failed, I was put under observation in the nut ward for either 21 or 27 days, I forget which it was. But I wasn’t charged with a crime. The second time, I was able to convince the medical staff that I hadn’t realized I had ODed; they sent me home but they were still suspicious.