Don't worry you're not alone. Heaps of people go through this and you need to realise that it's just a stage and you will get over it. In week four of this past term I suddenly fell into a deep depression, coupled with anxiety. I literally couldn't study for three weeks and had my first sick day since the start of year 11
It made it worse that I had trials in week 9 and 10. I felt exactly like you, as if nothing would ever change and my life would be crap. I ended up going to the doctors to get anti depressants. They are called 'Zoloft' if you want to look them up. After a week I started to feel heaps better and managed to study again. If your depression is seriously interfering with your life then maybe you should consider antidepressants cause they really do work.
I know how difficult it is to make friends, being a shy, introverted type of person. I think the worst thing you can do is act melancholy around people because they will avoid you. Try and be happy, smile and make conversation. Is there anybody at school that you talk to? Do you have a group of friends? Like everyone else said, you can't sit around dwelling on bad things or the past. Get outside and do something.