First priority should be to get well again. Everything else is only secondary.
A year from now, do you think anybody will say "with a five month career gap I would have accepted him, but that 6 month gap is really one month too many"? That will not happen. However, if you don't recover properly, you will have problems for much longer, maybe even the rest of your life. So relax. You cannot change it anyway. Concentrate on a recovery. Not on a quick recovery, but on a good recovery.
If you cannot use your CS skills right now, but you do have time to waste, maybe brush up totally unrelated skills. CS is seldom used on it's own. We always work for some industry. Maybe you can get some skills in an industry you'd like to work in. Financial? Business Administration? Project Management? Heck, if you want to go into that industry, even Chemistry or Biology might be helpful. But remember: that is secondary. It can wait. Do not let this get in the way of your recovery.
Being healthy and happy is a key skill that will outshine any "month" or "skill" in your personal life. And employers like to have happy and healthy people, too.