The real question is not "can you?" but "should you?"
For most people with a mental illness, even one that interferes with their work, the answer is probably no.
You've invested in that person and you lose that if you fire them. You also have the costs of the new hire. You have no guarantee that the new hire isn't going to have a mental illness. (The ageist culture of hiring in SF tech firms selects strongly for people who are at about the right age to have their first episode of psychosis - 14 to 35.)
Firing that one person for their mental illness related performance is very visible. The effect is to make other people with mental illness hide it from you. As a manager which do you prefer - Ann who has a predictable 2 hours for therapy per week over a 14 week period, arranged in advance; or Bob who just takes ad-hoc days off sick?
And, really, the role of a manager is to help workers perform better. This includes people whose performance has dropped as a result of a mental illness. Since work-related strss is very common any manager that doesn't understand mental health is just an unprepared - probably bad - manager.
It's probably not reasonable to expect a manager to correct performance deficits that are a fundamental attribute of a serious mental disorder. There are coherent, reasonable, intelligent people who have disorders that are beyond even the awesome powers of the modern software team manager. Beyond, in fact, even their ability to make assessments.
I think it's a little dangerous to suggest that a manager should be freelancing as a therapist --- which is what you're expecting them to do when you say that a manager should be able to help workers who are impaired by mental illness perform better.
Finally, from a legal perspective, post-ADAAA, it's pretty important for managers to keep a laser focus on actual job performance, and not to casually involve themselves in employee mental health. An overt suggestion that an underperforming team member might have a mood disorder apparently has some liability/obligation implications.
Managers shouldn't be trying to fix mental illness - what did I say that made you think that?
Managers need to understand mental illness so they don't fire people who have mental illness (suggested a few times in this thread and often on HN) or so they can do manager stuff like offer reasonable adjustments (or whatever those are called in the US).
I don't think you believe managers should be trying to fix severe mood disorders. I do think you may accidentally be asking them to try, though, when you suggest that they get involved with employees to help them overcome their mood-related performance deficits.
Managers should be especially careful about trying to discern mood disorders in employees who have not informed them of a diagnoses, as, again, doing so can create legal issues.
Employees suffering from mental disorders should work with their therapists to come up with a plan for maintaining work performance, and, if that plan requires accommodation from employers, the employee should request the needed changes. Employers, on the other hand, should be careful about making their own suggestions: for one thing, it can be unlawful for an employer to demand changes from specific employees based on a belief that mental illness requires it. But the better reason is simpler: managers are not mental health professionals.
Mostly, though, the subtext of my comment is that I think people may underestimate severe mental, emotional, and mood disorders. There are high-functioning clinical depression sufferers, and there are people who are authentically crippled by it. No amount of coaching and accommodation from managers recovers the performance of the latter group.
I hope it goes without saying that I don't believe companies should fire employees believed to have mood disorders.
For most people with a mental illness, even one that interferes with their work, the answer is probably no.
You've invested in that person and you lose that if you fire them. You also have the costs of the new hire. You have no guarantee that the new hire isn't going to have a mental illness. (The ageist culture of hiring in SF tech firms selects strongly for people who are at about the right age to have their first episode of psychosis - 14 to 35.)
Firing that one person for their mental illness related performance is very visible. The effect is to make other people with mental illness hide it from you. As a manager which do you prefer - Ann who has a predictable 2 hours for therapy per week over a 14 week period, arranged in advance; or Bob who just takes ad-hoc days off sick?
And, really, the role of a manager is to help workers perform better. This includes people whose performance has dropped as a result of a mental illness. Since work-related strss is very common any manager that doesn't understand mental health is just an unprepared - probably bad - manager.