My sister-in-law left her job for reasons like this. She has yet to return, I think it’s going on a year now. (She’s also a student, though, so there’s less of an identifiable gap in her time – plenty of people don’t work while they’re in school.)
When it comes to explaining this in interviews or whatever, I think the key is to think of it as a weakness you’ve improved upon. Employers love to hear that kind of stuff. Everyone has weaknesses or their own personal challenges, after all, so you’re not unique in that regard.
When you start looking for work again, that means you’ll be in a better place than you were when you left work. So, how did you get there? What have you learned about yourself, and in terms of avoidance techniques, and management techniques? If the line of work had to do with your difficulties, that’s a good thing to point to: “I realized I was in the wrong line of work, and after much self-reflection,” – and maybe you’ve consulted with employment counsellors, you should mention that too, or even discussions you’ve had about employment with a psychologist – anything – “I decided that this is the line of work I should be in, and here’s why” – and then you talk about your relevant skills, experiences, and interests.
Whatever you do, don’t make excuses or lay blame anywhere else. I’m not saying that in your personal opinion of your situation you shouldn’t make excuses or lay blame. For all I know, your situation is totally someone else’s fault! That may very well be true, but don’t frame in that way in your interview, becuase no matter how true it is, it won’t sound good. Turn it into a positive – a past problem that you have improved upon. Make it seem like all the time you weren’t working, you were pro-active in working to get back to working, you know? Even if you’ve spent many days in bed from sunrise to sunset – that may be understandable and reasonable from a personal point of view, but not from a professional one.