I'm not a medical professional, so I can't diagnose you. But I can possibly suggest a few reasons why your depressed and a few things that maybe able to help you with it.
If you think your depression is related to you being gay, then I recommend possibly calling, texting, or chatting with someone at The Trevor Project at http://www.thetrevorproject.org/ or 866-488-7386.
I also recommend you try looking up your local mental health hotline number (or if you don't like talking on the phone see if there's someway for you to text them or a similar program in your area).
In America 1-800-784-2433 is the suicide prevention hotline and 741-741 is a free sms crisis text line
In the UK Call: 0800 068 41 41 or Text: 07786 209697
In Canada Call: 1 800 668 6868
In New Zealand Call:0800 543 354
All of these should be avalable 24/7
There are a few possible causes of your depression.
If you enjoy school you might be getting depressed because it's coming to an end. Or you might be anxious that the school year is ending which can also cause depression.
Social Isolation can also cause depression, which can happen at the end of the school year when you or your friends may have less time for each other. Being socially outcast from friends or family can also cause depression.
It could also be a change in hormone level, as that can also cause depression.
Seasonal depression (or Seasonal affective disorder/ Summer Depression) also came to mind, considering that you seem to only get depressed at a specific time each year.
I don't know exactly what's causing your depression but I recommend possibly talking to your school counselor, (if your school has one,) I used to talk to mine when I felt depressed and she often made me feel a bit better. Or you can always try talking with someone through an online counseling site (maybe something like 7cups.com or Iprevail.com or possibly try going on samaritans.org and emailing someone instead.
Your depression does seem to be serious, so I really hope you contact someone and that you soon start on the road to recovery.