I went 2.5 years being suicidally depressed and managed to hide it from everyone, meaning my family and close friends. A few months ago I was just hanging out late at night at one of my best friend's place, the conversation somehow transitioned into depression and I just let everything slip, how long I had been depressed, how I had already written my note, how I was going to CTB in about a week right before finals, how I was in love with my best friend at the time, a girl who was in our friend group, the method I was planning on using.
It felt good to get that off my chest, and I decided to wait. I eventually confided in two more of my friends, and then two more. Then my friend who I was in love with found out through the original friend I told. Then she contacted my parents and the rest of my friends and briefed them, and now pretty much everyone in my life knows. I realize I'm very lucky in the fact that I have a lot of people that care and are actually really good at supporting me. A lot of them have gone through depression before so they understand, and the girl I was in love with attempted suicide years ago. She did not reciprocate my feelings, as I had expected, but she felt so bad about hurting me that her depression started to come back, which made me hate myself more when I learned that.
After the first month or two, I could start to feel distance between myself and some of my friends. I could tell it was taking a toll on them, so now I avoid expressing my depression to everyone but my parents and two of my childhood best friends. For the most part I pretty much act like everything is all fine and dandy now. Before it came out, this girl and I were like the duo of the friend group. We'd hang out with the others a lot but also did a lot of stuff on our own. What's ironic is that now she has replaced me with the friend that I originally told everything to and while we are still good friends, she is a lot more distant now.
My advice for anything considering confiding in someone they trust: as long as you know they won't tell anybody, you should do it. It helps to not have to keep it all in and feel even more isolated. Just keep the situation under wraps and try to not let them see too much of your depression and suffering. Human beings have an instinctual aversion to depressed people, and even if they are your friends and actually care about you, if you show too much of it, resentment will build up and they may try to distance themselves.