How about when there is sufficient evidence to justify detaining the person; in some cases, people might in some circumstances be allowed conditional release (e.g. contingent upon their continuing to take their medicine), but even such people would be clearly recognized as wards of the state.
In short: free people have the right to keep and bear arms. If there is just cause to deny someone's freedom, then and only then may that person be disarmed.
So outside or commitment or incarceration there is nothing that can or should be done?
In principle this is no different than figuring out when to call child protective services when there isn't obvious abuse but there are strong indications that kids are in imminent danger.
After the fact, people often feel that someone should have done something, but no one had the courage to do something.
Again, if you believe that someone is in crisis and cannot act rationally, when do you act and what do you do if you cannot personally intervene?