Hi there ~
Depression is a common complaint among teenagers and you need help with this.
Masturbation is a normal phenomenon when done adequately. I would recommend that you see a psychiatrist to get help with depression. Medications and counseling can help. I hope you
consult a psychiatrist as soon as possible, this will help your studies too.
I hope this helps. Take care and have a good day !