It is JSA you can't get for a period if you are voluntarily unemployed. ESA is only assessed on how ill you are, but is harder to get for MH conditions. It comes in two qualifying versions, Contributions based which depends on how much NI paid over the last two years, and Income Based which should kick in otherwise, but won't if you have a partner who is earning. Although as Suzetig says, it does pay your NI 'stamp' even if you aren't poor enough to get any actual money, and Income Based ESA does entitle you to free prescriptions, though Contributions based doesn't. It's a morass, but with enough effort and support you can get somewhere.