Depression Support Group
Depression is a real and debilitating condition that is often misunderstood by family and friends. Its meaning can range from a prolonged period of sadness to an actual mental illness with specific symptoms. Find and share experiences with others who are going through the same struggles.

Have you been tested for the MTHFR gene mutation that inhibits absorption of the b complex vitamins?
If you do have this, it's your lucky day. You can buy a very cheap vitamin B folate type thing that they prescribe you and it's CHEAP and you just take it and the neurons start firing properly and that's it. All over rover.
I am told it's a cheap test too - a mouth swab test. Go book a visit with your doctor to get that organised as an absolute first step. There are others here who have said it's been a life changer.
To follow up what Bridgie101 was suggesting, could you get a Vit D test on your blood panel at the Dr. appt. too? I found that I was Vit D deficient several years ago, and it really made a difference in my mood when I started taking 5000 IU per day of an OTC I found at Natural Grocers/Sprouts. There are no side effects, and its something you can get from the sun if you don't want to take a vitamin. Its a good reason to take a walk outside daily with your dog, if you have one. :) Or around campus...
Have you already talked to a counselor about the social anxiety? You sound like a perfectionist who also struggles with social confidence, and these issues can be worked through with a licensed therapist. Perfectionists try to control their environment and get self esteem boosts from academics quite frequently, but its a vicious cycle that can cause their world to crumble when they can't get the results they desire. Which causes a general lack of self confidence in life and a melancholia that is persistent, not to mention overwhelming. Maybe academia is the only place you have felt safe or gotten praise in the past? Maybe your parents really prized academics in your life and you do it to please them? If you're an only child, this would be very easy to have happen...but I digress. I was a perfectionist and things have changed for the better for me over time and perspective changes.
So, have patience with yourself and start to recognize that you have other gifts and talents in life than just academics. Your security does not come from the university, but from your own confidence in yourself. You don't have to stay a slave to your blues, you can change and have happy days too. It will take some time and a good deal of effort, but you can do it. Praying for you friend!
~Blessings and Peace
Second, I putted my life in perspective. I started thinking about what would happen if I stay like that. I would lose all my jobs. I would not be able to provide. At the time I was living with my parents, so I was thinking, one day they will be gone. Sooner or later I have to go out again and face reality. Plus, I do not want to stay like that forever. That helped me a lot. I put so much effort into going out and doing the things I had to do.
Finally, this was the most revealing stuff. One day in the middle of my attacks I had symptoms of a cardiac problem. I was very scared. But didn't want to go to the ER again for them to tell me I was fine. That day I just laid down and though to myself: "If I am going to die, it will happen." I got tired of feeling stressed all the time about something I could not control. That led me to accept the fact that yes, I will die some day. When that happens no one will be able to do anything to stop it. So whats the need to worry.
After I accepted I can't control the stuff I feared so much. Things started to become easier for me. It took time and a lot of effort, but I managed to survive.
Find out what scares you and either accept that you can't do anything about it (If you really can't). Or do something about it if you actually can do something about it.
Also, don't be so harsh when you judge yourself. We tend to be hard on others to, because we are hard on ourselves. So please stop expecting to control everything. It will not do good to you.