It may be a matter of debate with staff at your local Job Centre. There's an argument that if you have a health problem which stops you studying, then you wouldn't be capable of working. If you aren't capable of working then you won't be job hunting, so you won't be eligible for Jobseeker's Allowance.
On the other hand, you may not be seriously enough affected to qualify for DLA/PIP. It's one of the holes in the current system. I have a friend with a relapsing/remitting long-term mental health problem, who falls into this trap.
I suggest you make an appointment to talk to someone at your nearest Citizens Advice Bureau. They should be able to give more specific information and it's a free service.