It's always a bad idea to lie to a potential employer. Tell the truth, but leave out details they have no right to know - you can be honest but still demand your privacy. So you were having problems with your health, and you didn't want to be a burden on your employer during that time. The fact it was your mental health is none of their business. And the fact that you were considerate of your employer also reflects well on you. I think it's ILLEGAL most places in the US, to discriminate in hiring based on a medical condition that doesn't interfere with your ability to perform the job. (Someone check on this, please?)
If they press you on the matter and demand details, it's a company that will not respect your privacy, and you shouldn't work for them anyway.
_________________
Sainte atha ma u Hrair, kan zyhlante hray u vahra ma hyaones.
My heart has joined the Thousand, for my friend stopped running today.