Mental Illness as a cause of academic disruptions I'm an undergraduate mathematics major and I also struggle with PTSD and depression. A lot of the trauma is triggered by being in a close-spaced classroom environment which makes attending classes very difficult. Basically I sit in the classroom understanding nothing because my anxious I am unable to concentrate.

What this has done is cause me or forced me to drop two classes and receive a W grade. Even though two isn't bad, I was looking forward to transferring to a better school, Stony Brook but now I'm afraid that the second W is going to look bad especially because I only have 19 credits. 

Also I want to go to a good mathematics school and the dream is to be able to get a Phd. one day. Academically I have been doing great in the classes I have stuck out in, all 3 A's and two A-s. I love mathematics and usually enjoy doing it in solitude. I am able to do some proofs(although the easier ones) which my peers seem to be uninterested in. Applying to a grad school or even undergrad, is it advisable to disclose a mental illness? Usually if you do this at a job interview they will look for some other excuse not to hire you. Do universities see this as a red flag that student is unreliable so shouldn't be accpeted as readily? Hopefully, going forward these will be my only two Ws.
You don't say where you're located, but assuming that it's in the US, the real question isn't "should you disclose these issues to a graduate school", but rather, "Have you disclosed these issues to your current school and asked for the accommodations to which you are entitled?"

If you're legitimately having problems with anxiety and PTSD and have a diagnosis, the school must make accommodations to help you succeed, per Section  504  of  the  Rehabilitation  Act  of  1973, since you're an adult student, you have to self advocate. That means going to the school, telling them that you have these problems and working out a plan together.