The answer is treating it as a medical and social problem, it's a known solution, it just costs money and Portugal decided in 2012 to cheap out on it, outsource it, and then act shocked when it went wrong.
I guess salaries which allow people to provide for their basic needs would be a good start. Or providing secure, safe, affordable housing. Where people don't live in constant fear and material insecurity which makes it impossible to sleep without getting fucking blitzed, and where you're too busy working every hour god sends in miserable conditions, to build or maintain a supportive social network.
What, those aren't the priorities of Jeff Bezos? Huh....
Surprised to learn that, given the rosy conditions at amazon warehouses.