I'm dealing with this actually right now as well. So from what I'm learning it depends on the root cause of their mental state. Like is it drug induced? Disease? An organic physical condition. You have to start from there and work your way up through treatment.
Sometimes though a person will be belligerent and refuse to get help. Which is when you have to pull back and let them fall. Only then will they probably be willing and grateful for help.
But that can be dangerous depending on the condition. So there is a lot of fine line walking.
But approach everything with compassion and knowledge.