Please listen to someone.
Don't expect for them to come to you with their problems.
Be open, be chill, and don't try to solve every single problem or try to dominate them by saying "you shouldn't feel that way."
Be approachable, stop being so judgemental, stop playing those stupid "I'm smarter and you're an idiot" games. Don't carry an air of superiority.
Consider others' feelings seriously. Don't write them off as "oh, they're just being like..." or whatever.
It's different for everyone, but those were the things preventing me from talking with a lot of people, including my own family, about my condition. I did have people I did talk to, and I'm doing fine now, but I feel like only telling the people with depression to "talk to someone" is only half of the issue sometimes. It can be a lot harder than you think.
Be someone worth talking to.