Education can be hard enough without adding the extra pressure of battling a mental illness.
Many schools have very supportive teachers who will do their utmost to support you. Especially if you are sitting external exams, teachers will make sure you feel you are coping as much as possible.
They can put many provisions in place such as giving you extra time in exams, letting you sit the exam in a separate room or giving special consideration, which may help your grades.
If you go to university, most if not all have a disability service that can help you get the support you deserve. Check out your university for more information.
Remember, education is not the be all and end all. Things will work out how they are supposed to eventually. Health and family are more important.