Assume a student with diagnosed depression or bipolar disorder has already been admitted to the university, and thus has a resume comparable to their peers. How do you feel about taking them on?
Speaking both as a PhD advisor and as someone with a diagnosed and controlled bipolar disorder, I would definitely consider a student with mental health issues. I would, much like awsoci discusses in their response, insist the student not treat the advisory relationship as a therapeutic outlet, and that the student lean on the available resources inside and outside campus.
My own PhD advisor (back in the day) knew about my issues, and the same holds true for all the PhD students with mental health problems I know right now.
All that said, there are risks with disclosing, and definitely with disclosing widely. There is no guarantee that any given PhD advisor would be fine with the situation, and even if there are anti-discrimination clauses available, the relationship might not work out well in the end if it starts out on a shaky basis.
To summarize: In principle and in theory, advisors should take on qualified students with disabilities. In practice, your mileage most likely will vary, but I personally would not let the disability be a deciding factor in taking on a student.
As it's not 100% clear as to whether you are asking as a PhD student or as a current PhD adviser, this answer (hopefully) addresses both. The theme of this response is understanding the role of boundaries.
As a student, there are a number of options available to you regarding your mental illness to help you succeed. Remaining in treatment and utilising the disability/accommodation services will help you.
Being honest about your mental illness with your supervisor can be beneficial to help you succeed, or detrimental to your success. Unfortunately, as others have said, there are still high levels of discrimination regarding mental illness, and the higher levels of Academia have a bit of a 'if you can't handle it, get out' mentality. It might be worthwhile just seeing how your supervisor is before being honest about your mental state. Depending on the person, it might be more prudent to use third-party services (i.e. Disability accommodations) should you need an extension or deferment throughout your study.
As a student, should you be honest with your supervisor (and they are receptive) to your honesty, it's important to perhaps be mindful of boundaries. One of the most important things I can suggest is that your PhD adviser is, a PhD adviser. Many of them are not trained nor qualified to handle in-depth discussions about mental illness nor provide a space free of 'triggers'/a therapeutic space. Letting them know you have a mental illness and what accommodations you might need (and keep in mind that some of these might not be able to met, this is the nature of academia) are good steps, but you do not necessarily need to be detailed about what's going on, nor should your supervisor be asking you these details. You will, however, might need to substantiate your claims, which is why I strongly, strongly urge that you get registered with your disability services centre.
By being registered, they can help speak on your behalf and verify your claims without having to go into details. On the other side, this means your supervisor is not subjected to conversations they may not be qualified to handle, and protects both their well-being and yours. This keeps the relationship between you professional and perhaps friendly as well.
As a honours supervisor (and maybe in a year or two, a PhD one) I am happy to take on students that may have a mental illness, provided that they are utilising treatment services (whether it be therapy, medication, support groups) as well as university services like disability/social justice.
More importantly though, is the maintenance of boundaries. I am not qualified to listen to or help with mental illness, experiences of trauma etc. The best I can offer is directing students to the appropriate on-campus services (I will even walk with them there if they need) but that's the limit.
Students who come to me but refuse to seek any kind of treatment/help, expect me to be their main point of counselling etc, or get registered with the appropriate services I am very hesitant to take on. In my experience, a few of these students have 'gone-off-the-rails' at me, and have lead to some instances of needing to get security and other services (like safer communities) involved. It is sad, because I know that their expressions of hostility and aggression are not because they are bad students, or bad people, but suffering from an untreated mental illness. But I have to protect myself and my safety as well.
If students come to you with a mental illness, it is important to reiterate these boundaries not to be cruel, but to help them understand that you do not have the experience or qualifications to support them effectively should they require more than assessment/etc support. Directing them to register with the disability accommodation services, and working with those services to help students succeed is vital. But under no circumstance is becoming an ad hoc counsellor part of your role, which is for the safety of both the student and yourself.
Many people might disagree with me on this, but there is a trend in the blurring between the professional and the personal in academia, with more students going to professors/lecturers/supervisors with detailed descriptions of their ailments/traumas. Many of us are just not qualified to help, but some of us are more than willing to work with the appropriate services to help students succeed.
Diagnosed and under treatment is better than undiagnosed, actually. But even without treatment, many folks have developed coping strategies for handling these conditions. The question isn't whether someone has a condition but whether they can do the job with reasonable adaptations. Judge them on their merits, not on your assumptions.
I will respond here to the general picture formed by several of your posts, in addition to the question you posed here.
My mother once wrote a very convincing article claiming that Richard Feynman was bipolar. She cited evidence from his books.
People with bipolar disorder can be productive members of society, and of academia. They can find their work, even academic work, rewarding.
On the other hand, graduate school can be a big time sink. A body in motion tends to remain in motion. Being in grad school can be like Charlie on the MTA -- he could never get off the train because he didn't have a nickel, and in that train system, you paid when you got off. Once you're on that exercise wheel, you tend to just stay on it, just because you're on it and it's still spinning.
Having a PhD is not the only route to professional self-esteem, believe it or not! (It can be hard to appreciate that while you are in the thick of it, just as it is hard to appreciate the true height of a mountain when you are standing at the foot of it.)
Also note, graduate school can be extremely stressful -- depending on the particular circumstances. You may at some point decide that at this particular juncture of your life, that kind of extra stress is just not what you need right now, in order to take good care of yourself.
I am saying these things so that you will not feel forced to continue. It is hard to realize, while you are in grad school, that you have a choice whether to continue or not. You are surrounded by people who are in grad school, and are continuing. Being in grad school starts to become part of your definition of yourself. But if you take a step back, you will find that there is a lot more to you than just your grad studies self. Then you will be more free to make a choice.
I have a hearing impairment. I had a great deal of difficulty, when I was in grad school, going to speak with a professor in his office about how hard it was for me to follow the class when he stood smack in front of the equations and sketches he had just made, while talking about them. I did it, but I was extremely uncomfortable doing it -- largely because of their unsupportive reactions.
That was more than 20 years ago. Now things are different. Universities have offices for students with health conditions that can potentially affect their functioning in school. Could you go to that office and ask them to send someone with you when you want to talk with a professor about something that feels a little touchy to you? That is what I would have liked for my uncomfortable conversations. Also, maybe they could help you explore options such as a medical leave of absence. Even if you don't end up taking one, it could help you resolve your inner tension about your studies if you didn't feel so locked in.
My sixth grade son has Tourette Syndrome (and associated OCD). Teachers and staff don't know much about this condition -- even when they think they do! What was extremely helpful was that the Tourette Syndrome Association sent an advocate to his school to educate staff.
I know it's possible to have a 504 plan in college -- but what about grad school? Can your 504 plan accompany you when you go to a PhD program? Do you have one? If not, that might be a good place to start. Obviously, in the legal sense, you have as much right to an education as anyone who doesn't have bipolar disorder has.
Could you connect with the Students with Disabilities office at your university (if you haven't already) and let us know if that was helpful?
My university had a rule that if you took some time off, you had to come back and resume your PhD studies within 7 years of stepping away. If you wanted to stay away for more than 7 years and then come back, you either had to re-sit your exams, or apply for special permission.
Bottom line: in theory, telling a potential advisor about a disorder like this shouldn't have any negative effects (ethically or legally speaking). However, you shouldn't have to face this alone. I hope you'll give your campus disability office a try.
Graduate admissions is different than undergraduate admissions: in order to be admitted to a good graduate school, you already have to have a solid record of sustained good performance in highly technical work. Graduate school challenges you in new and different ways, but a well-qualified application shows that the person has certainly got effective coping strategies. Most of the non-functional people I know with such disorders didn't make it through undergraduate, while most of the functional people I know with such disorders have had non-functional periods, but have developed coping strategies that are sustainable long-term.
More to the point, when it comes to mental health, it is important to understand that the line between "disorder" and "normal range of variation" is quite fuzzy and subjective. Unlike with most physical illnesses, a critical component of the definition of mental illness is that it has a significant impact a person's ability to function. What this means to me as a potential supervisor is that I would consider a mental illness diagnosis as informative ("if things go wrong mentally for this person, this is type of problem they are likely to have") rather than predictive ("this person will be a problem").
I would consider it entirely reasonable for a person to choose to either disclose or not disclose. My main concern would be if the person was using their disclosure in a way that felt like they were making excuses for problem in their past as opposed to simply providing information. That concern has nothing to do with the mental illness diagnosis and instead is about whether the person tends to assume or deflect responsibility, which is much more important to my evaluation of whether I want them working for me.
I am not a PhD advisor, but I think I am a quite experienced doctoral student.
Of course, it really depends on the person, and since you probably can't have an insight in what is going in a particular person's mind, the best you can do is take some common-sense estimate and go from there, taking any specific observations into account.
Most people would think that it would be fair to offer a student with a mental condition equal opportunity as much as possible, but the decision to be a student's PhD advisor is a serious and somewhat personal one, and in that respect most professors would have more or less reluctance to do so.
Most mental conditions are a private matter protected by a number of acts (HIPAA, Privacy Act, etc.), and it would be usually in student's best interest not to disclose having them. I would never disclose any information like that in the school, where I am doing or planning to do a PhD.