Largely through private charity. People with mental health problems also tend to die fairly young on the streets. I live somewhere with a friendly climate to the homeless, and the chronic homeless are mostly well under 40 or retirees who can no longer make rent.