The answer is quite simply, they are not entirely private actors, they are doing the state's business. They are effectively deputized.
A psychiatrist or other doctor who "certifies" a person for emergency commitment becomes the state's designated decision-maker. He authorizes the use of the state's coercive power to hold someone against their will in a locked room, often with security guards outside to prevent escape. The hospital which pays the guards and maintains the locked room becomes the state's designated custodian. No other private person may authorize the arrest and effect the involuntary custody of an individual.
Doctors and hospitals do this, however, for at least some limited time, longer than what it takes for law enforcement to arrive on the scene and take over per their independent observation and judgement, as in a citizen's arrest. In fact, doctors and hospitals take their cues for involuntary emergency commitments directly from law enforcement after the fact, if a person is brought in by the police. The police go away and the hospital takes over for them, even if the "patient" continues to insist that he or she wishes to leave.
Private individuals, no matter who they are, may not unilaterally deprive a person of his or her liberty for mental illness without medical and institutional (hospital) authority. Such authority is not inured in the general citizenry. It is bestowed by the state. In fact, in modern times it is formally bestowed with great and complex ritual, in written state mental health codes.
If a person is confronted by police in a private home, strapped to a gurney and removed over his protests to an emergency room, guarded there and prevented from leaving or making phone calls to family or attorneys, assaulted and battered, unsubtly threatened with continued imprisonment unless and until he signs legal papers absolving everyone involved, and if he is then billed thousands of dollars for "hospitalization and treatment" ... and if everyone maintains after the fact that it was all perfectly legal ... I say we have combined action under color of law by public and deputized private actors.
If the involuntary "patient" was indeed dangerous to self or others, perhaps the state action was justified. But if the individual was never dangerous to anyone, everyone who did it to him should have to pay for the insult, big-time.
The state deputizes doctors and hospitals to remove those who seem dangerous, or those who are particularly obnoxious. But people prefer not to look very closely at the application of violence against individuals. They are squeemish, and they're happy to believe that involuntary psychiatric commitment is really medical "help" rather than imprisonment. Before most of us ever notice that the therapeutic state is all about tyranny rather than therapy, it may be too late.
That's why those of us who are forced to notice should at least be allowed to sue!