Basically what the question says: is it a good idea to sit down and openly talk with their PhD advisor about struggling with depression?
Sending support to anyone out there struggling ♡
I can give you the perspective from the supervisor's side. It's a good thing to ask your fellow graduate students, but the drawback of that approach is that their experiences will have an n=1, so you'd have to listen to a lot of tales to triangulate an answer.
From my experience as a professor, supervisor and advisor to many students, I know that is that it is very common for graduate students to suffer from depression. For example, this article in Nature cites that
In a 2019 global survey of 6,320 PhD students, 36% of respondents reported seeking help for anxiety or depression caused by their studies
This is supported by my direct experience. When I was a graduate student at an R1 institution, almost every graduate student I knew was taking antidepressants.
In my experience as a professor, it is also very common for graduate students to share this with their advisors. I know, since I am known to be a good point of first contact for undergraduate and graduate students suffering from depression and other mental health issues, so I get to hear from a lot of students about their struggles. I am not a therapist, so the only "real" thing I can do is to refer them to the counseling center, but they come to me because they can expect a supporting ear and not judgement. So I can tell you that it is very, very common for students to both suffer from depression, and to talk to professors and advisors about it.
We still have a long way to go, but the days when admitting to depression made you look weak, or destined to a mental ward, those days are gone. Having said that, beware that if your advisor is an ass, they will be an ass about this too, so if your question is "should I speak with my advisor about my depression", the answer is "it depends on who your advisor is." But in general, you can expect that the majority of advisors will be sympathetic and supportive, because yours will surely not be the first case they hear about, and all of us went through grad school and know how stressful it is.
I have been very open with my mental health struggle with my supervisor ever since the start of my PhD. The situation I was in at the start was not something that was letting me work properly as I should have, and I felt like I needed to explain it.
I have ADHD and have been very productive during my undergrad and master (in CS), often hyperfocusing on coding, and the drop in my work output made me feel even worse and I felt the need to justify myself. I brought it up slowly, first explaining that I had trouble working sometimes. I mentioned related issue with it, such as my parent gambling addiction, and the toll it was taking on me as I was the only one supporting them. The fact that it was during Covid and lockdown didn't help, and I explained that staying at home all day was not helping.
Basically, I tried to not suddenly drop my entire life problem in the conversation, but over some meetings I explained some of the issue, and what were the consequences, at the time, on my work for example. It helped especially when I had very bad day and had to take a day off, not having to create a fake justification was very helpful. I tried to keep it related to the PhD, and not go too much into my personal life.
I never brought deeper issues, such as suicidal thoughts/attempts as: 1) I was not comfortable bringing it with anyone I was not very close. 2) I didn't think it would have helped the situation with my supervisor. 3) I feared it might actually change (in a bad way) our interactions.
I think I am lucky that my supervisor was very understanding during the whole time and offered me support if I needed ait. Like everywhere, with everyone, it mostly comes down to the person you are talking to. I slightly hinted at some issue I had, and the reaction my supervisor had made me trust I could explain in more details what the issues were. On the other side, I tried the same thing with my co-supervisor, and it became quickly apparent that for him, mental health issues were just something you had to motivate yourself to get over with.
Your university probably have a service here to support you in this type of situation/help with mental health, and they will be very understanding of any issue you have and should be there to listen to you. They may help you with how to discuss it with your advisor as well. In my case, I also contacted the administrative services of the research institute to document my issues, which helped me apply for extensions for medical reasons.
It's nice to know that academia has a few supervisors like Cheery.
Yet I feel that the majority - despite wanting to be positive toward the sufferer of depression - are not really equipped by nature, background, training or resources to be of much help with this.
I am sorry to tell you that in my own experience the personal/family/relational problems of graduate students are often issues that should never be discussed in any terms with professors in general, nor with fellow PhD students in general for the same reasons and also due to their self-focus during their program.
Only with those rare atypical individuals in academia can one open up like this. Yet even these can do little other than send you to the doctor or psychologist - something the guy next door can tell you.
My advice is to go to a health professional downtown (not the campus ones) and if he/she thinks you need some time off then they will write a note in general health terms to your HoD.
It's amazing how much harm people do when they are trying to avoid being seen as unsympathetic although that is exactly how they feel. So don't risk it unless the signs are very very good indeed.