I was unemployed for nearly three years - my job contract finished, and I struggled to find another job, and though I had horrendous depression at the time, I wasn't signed off with it. I really struggled, and during that period, also developed severe anxiety, to the extent it used to take me several goes, for example, to get to the doctors, and I mostly stayed in my 8 x 8 bedroom, as I was in a shared house at the time, and couldn't stand other people around. It was utterly vile, and I lost all hope of a future.
However, in the end, the house share broke up, and I was struggling to find somewhere else to live: I ended up living rough in the park, and used to go into my library to keep warm and use the loos etc. By chance, one day there I saw a job advertised that was the sort of thing I had been doing before, and decided to apply: that was a limited contract job, but the experience I got in those nine months led directly to me getting the job I have now. For five years, I've been in a permanent position, and no-one believes that I have direct experience of struggling on benefits.
I'm still not better - but I am better than I was, and my life situation is much, much better. It was absolutely a random chance that led me to see and apply for that first job - and chance, really, that I got it: but it turned my situation around. I don't have much practical to offer you in terms of advice - but I had given up all hope, and still, things ended up working out: there's no reason that shouldn't be the case for you too - I'm not a nice person, or a special person, and most certainly not a "lucky" person (in the conventional sense - I am the person who will inevitably lose the winning lottery ticket etc) so if it can work out for me, it can definitely work out for you.
I guess my only piece of advice would be to keep persevering, even when you don't feel like it: because if you don't apply, you definitely won't get that job.
Hang in there...