Hi... Please be assured that your academic performance is not directly related to your mental health but your mental health is taking a toll due to your academic pressure.
I have worked on several such cases during my tenure with BITS Pilani. Academic Institutes do consider genuine cases and give students a chance to complete their degrees with or without gap. It varies from case to case basis. But mental health is considered as an important variable these days.
So please share your concerns with your university professors or staff or medical/counselling professionals available on campus.
Also, in the real world your skills and abilities matter more than just your grades/degrees. You will see people with very limited education reaching places. So just give yourself an even chance.
Next Steps
Consult a Psychologist.
CBT along with Career Guidance and Counselling is required.
Health Tips
Mr. Gunjan Maithil
Senior Psychologist
Cell: nine six seven one three zero three one three four
Website: https://gunjanmaithil.wixsite.com/therapy
App: http://wix.to/fECHB08?ref=cl