It depends on the circumstances and the order that you want to join. I was discerning for a short time with a Carmelite Monastery, and they knew that I had a history of depression, but since it could be stabilized with medication and I was doing great, the Superior said that they would accept me, and even let me continue the medication there. When I first read the email, I thought I was reading it wrong. I thought she meant that I could take it while I was visiting them, but she meant while I was living with them.
The orders I have been in contact with say that you need to be off the medication for at least a year and doing fine before you can ask for an entrance application. I took myself off the medication gradually and I have been anti-depressant free for 3 months so far!
*It may depend on exactly what the illness was and what community. Communities vary and some are more flexible…
If you are truly considering testing a vocation I would speak to your parish priest,vocations director for your diocese or your spiritual advisor. Religious life has many challenges and all orders do require good health and psychological testing… Good luck on your search *
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.