How do I talk to my professor about my anxiety/depression? I am 22 years old and I have recently began my first year of grad school. It is very overwhelming. Everyone seems to have more developed thoughts than I do, and all my classmates are 2nd or 3rd year PhD students who speak in metaphors. I have struggled with anxiety and depression for about 5 years now. I have had all kinds of treatment for it. I am currently not being treated for it. About a year ago I decided I did not want to take medicine anymore, and my doctor gave me permission to wean myself off of it. Up until last month I was okay. The way I feel right now I have not felt in two years. My anxiety attacks are prevalent and I am so overwhelmed with sadness I cant get up in the morning or eat. . I have probably about 3/4 attacks a day and because of it I have not been to my class in 3 weeks. I am up to date on all assignments, however, participation is 25% of my grade and I have now missed a total of 4 classes out of 12 overall. 

I do not know how to talk to my professor about this. I have crippling anxiety when speaking to professors about my struggle with anxiety due to a bad experience. In my last semester of undergrad, I disclosed to my law professor that I had anxiety in general, and also extreme anxiety when speaking in front of  a large group. He essentially told me that he did not care and I needed to get over it. He also said that if i ever tried again to "take an easy way out", he would fail me. Long story short, I got up in front of the class to present my brief and I fainted two minutes in. My professor laughed and made jokes about me and I decided not to apply to law school. I am forever scarred by this and I am tempted to just take a W in this class, but I feel deep down that the right thing to do is talk to my professor first. If anyone has any advice for me, I would really appreciate it. I am just very insecure about this. Sometimes my depression convinces me that I am not depressed at all and I should just get over it, but I don't know how.
First, everyone feels overwhelmed in grad school, and nearly everyone suffers from imposter syndrome.  It isn't just you who feels like everyone around you is better.  This isn't likely to help with your illness, obviously, but I think every grad student is better off once they internalize that idea.

As @ff524 pointed out in the comments, the first thing you need to do is go talk to your school's disabilities office.  You don't need to go in with a clear picture of how it goes or what you want out of it - you just need to go in and explain the situation to them just as you did to us.  It's their job to help you, and very often that includes facilitating conversations with your professors as well.  

You don't have to go to your professor and throw yourself on their mercy.  I understand why you would be traumatized from the awful experience you described, but understand that what that professor did wasn't just wrong, it was likely illegal. Faculty have clear obligations that the disabilities office will help them understand and work through, just like they help you.

You should also get in touch with a mental health professional.  If you're in a new town away from your old one, go to your school's health center and I'm certain they can refer you.

Basically the only "wrong" thing you could do is to continue doing nothing.  Get in and get help right away, and don't feel even remotely bad about doing so.  This is exactly what those resources are there for.