Only 8% of the currently homeless population became homeless because of mental illness. People with mental illnesses are by far the most visible of the homeless, because they are crazy. But they make up a minority of the population.
18% became homeless because of drug, or alcohol abuse. 42% report drug, or alcohol usage, even if that might not be the cause of their homelessness. 39% report psychiatric issues, even if that might not be the cause of their homelessness.
[1] http://hsh.sfgov.org/wp-content/uploads/FINAL-PIT-Report-201...
Source (pg 22, Mental Illness + Alcohol / Drug Use): http://hsh.sfgov.org/wp-content/uploads/FINAL-PIT-Report-201...
"Over one-quarter (26%) of respondents identified job loss as the primary cause of their homelessness. "