If they have a treatable condition tht can hlped then yes. You can be sectioned under the mental health act, and forced to take medications. The reason I said if treatable is because if someone has a personality disorder they class that as untreatable and the vast majority will not be helped by mental health hospitals or medication in most circumstances.
It depends on whether it's life issues or whether it's a mental condition causing this suicidal feelings. If it's life issues, they are likely to refer you to a counsellor rather than detain you.