I agree with Das Nichts in that the main issue is the framing of suicide as 'selfish'. I think the way a lot of people see it is something along the lines of: "someone is having a bad day—who doesn't—but instead of getting over it like a normal person they kill themselves without considering how it'll hurt the people around them."
Some people in my family fail to understand that depression isn't just being in a bad mood. Sometimes, it's literally your brain not producing enough dopamine or serotonin. Medical or not, it's years of 'bad moods', only that 'bad moods' are more of a baseline and it gets so much worse, constantly. Maybe it would be selfish if someone had one bad day and decided to CTB. One way I've seen it explained is that people with depression are fighting a losing war. They've won hundreds, maybe thousands of battles, but it only takes one loss.
Suicide could still be selfish, strictly speaking. Referring to google's definition as it relates to my experiences, while I normally care about my friends and family, there are moments where all of that goes away. There's only this feeling of suffocating, almost, and just wanting the suffering to end.
While *some* of the stigma around mental health has gone away, there's still a lack of empathy for people who are struggling. I think it's selfish to pretend that you know someone's situation better than they do. "It'll get better" can only work in so many situations, and it just loses more meaning every time.