Just treat them like a human being instead of like a streetlamp or something. Speak to them. Ask them how they’re doing (I know the answer is probably “shit” but still, let them talk about it if they want to).
I mean, it sounds nice on paper, but at least in the West a non-trivial percentage are so mentally ill average Joe can’t really be their friend effectively. Using judgement is recommended.