The inability to hold down a job is a very common symptom of mental illness. In other words, it is no secret that your mental health hinges on whether or not you contribute to the economy.
But what is also true is that losing your job can be a precipitous plunge into mental illness, as your outside world that was regularly structured turns to chaos suddenly. And of course, if your external world becomes chaotic, your internal world is liable to be chaotic as well--'as above, so below' and all that.