At least in Germany the treatment by itself is also not mandatory in a psychiatric clinic, but one can be held there for example in order to prevent suicide. Then it’s up to staff to convince patients of a treatment plan, they have to agree to that for the hospital to start treating. Until then the hospital is pretty limited in administering anything.
But befor the conversation details into ethics questions of forced institutionalizations. I think it’s worthwhile to point out that easy access to mental health is for everyone in society is of utmost importance. I can only assume but I think a lot of people on the street wouldn’t be there if they had seen a psychologist earlier on, if they had not started to self-medicate with alcohol and drugs. It’s beyond me why rich nations in the west don’t promote early intervention much more