I never thought this was related to me being unable to find a job but it makes sense. As others have mentioned, I know from experience that being unemployed for a while will deter people from hiring you. But sometimes people don't care about that - it just takes a while to find that employer.
Out of 7 years after finishing college, I was employed non-consecutively for a total of 2 1/2 years at 3 retail jobs. I had to leave every one of them due to stress. I never found a job in my field and I've kind of given up trying because at this point, I can't work at all. Unfortunately I lost interest in my degree (computer information systems/programming) since I wasn't using it.
I'm not trying to deter you, just sharing my experience. You should definitely try to figure out the amount of stress you can and can't handle. And if possible, try to find an unpaid internship if you need experience. Depending on your field, you may also be able to freelance. I designed websites and did computer repair off and on for those years.