I would be honest but vague. You don't need to tell anyone you had a mental health issue. You can just say you had a health issue and took time off to recover and during that time you continued to expand your CS knowledge in areas X,Y and Z.
Look at what the company is interested in and study those X,Y and Z areas so at least you can speak to them. Add them to your resume and look for interview questions online that could be asked. Its okay to say to a few questions, I don't know the answer although people might word it as I've never run across the need to do that or use that in my projects but I know a little about it. Sometimes, you can say you don't knoqw and then ask them to explain it to get a conversation going.
Remember during interviews, you are interviewing them as much as they are interviewing you. You might want to aask about the work environment, the kinds of projects that they work on... It takes some time to learn how to talk the talk to show you know stuff, are willing to learn new stuff and aren't afraid to say so.
Other things I tell interviewees is to customize your resume to the job you are applying for. Don't make them search all your skills and then decide if you fit. Let them know you fit so you can go to the next step: an interview.
Also keep copies of all applications you submit and the resumes you sent along with them so you'll be prepared for the coming interview.
Also its good to sprinkle in some of your hobbies that may be relevant. I know bosses who hired folks because they were boy scouts or eagle scouts or were in martial arts students or played an instrument or went the same college, highschool... Things like this may come up in the interview itself and you can mention your interests and common connections as well.