He should probably be on SSDI (Social Security disability). some people don't respond to medications, or refuse to take medications. Many of my clients come to the shelter because their emotional disorder or mental illness has made it impossible for them to hold a job. I work very closely with county Mental Health. some of my clients stabilize and return to mainstream society, but others I help get on SSDI and into low income housing.
As an employer it is not your responsibility to keep an employee who is that unstable, even though, as a nice guy you want to help the guy out. Most people with mental and emotional disorders are extremely intellegent people. Perhaps, if faced with this situation again, you can have a private conversation with the person and ask if they are having problems getting their medication, or something along that line so that you can figure out why they are so unstable. If it is something as simple as needing meds, or medication adjustment, and if you speak to the person gently and in a caring manner, you may be able to help the person keep their job.
do you have an EAP (Employee Assistance Program)? If you do, you should be able to call them for advice. If not, try calling your county mental health unit. Usually if you tell them what the situation is, without disclosing a name, a trained professional will be glad to offer you advice on handling the situation.