Speaking from my own experiences with depression (and, I suppose, only from my own experiences), I can tell you some common things people do that do not help, and in fact may make things worse.

1. Don't call suicide "selfish", "cowardly", "the easy way out", etc. Firstly, death is literally the hardest and most dire option, so there's no way in hell it's cowardly or easy. In terms of "selfish", just... no. When someone is contemplating suicide, in the moment, they're often thinking about everyone but themselves. They're convinced -- whether accurately or not -- that they are a drag on everyone else. That everyone will be better off without them. Sure, they may realize their loved ones will hurt when they're gone, but that pain (they will convince themselves) is mostly temporary, while the pain they (believe they) are constantly causing their loved ones will finally end. As twisted as it might sound to someone who's never been in that position, suicide can feel like you're doing your loved ones a favor, the opposite of selfish.

If you've ever seen A Star Is Born, that perfectly shows this. (Spoiler alert if you haven't.) Bradley Cooper's character has convinced himself that he is destroying his wife's life and career, and that gets reinforced by another person's warnings. But he also knows she loves him dearly, so to him, the kindest thing he can do for her is die. If he leaves her, she'll always resent him and be devastated; if he stays, she'll always resent him and be devastated. But if he dies, then she'll be sad for awhile, then move on with a better life. I've heard people say the movie "glorifies suicide as an option", but they aren't listening to it; there's no glory in it, and it's not "an option" for him, it's the only option he feels he has left, for the sake of the woman he loves most in the world.

Alternatively, labeling a suicidal person with negative traits like "selfish" and "cowardly" might just reinforce their own self-hatred and make them feel like their life is even more worthless than they thought. In short, these are never helpful comments or views.

2. "I was depressed, but I just exercised more / ate healthier / snapped out of it / stopped whining / etc. and I was fine." No, Karen, you didn't, because you weren't. Sadness and depression are two different things, and someone who is clinically depressed won't just be "cured" by a healthier physical lifestyle or some fresh air. These kinds of comments fully misunderstand what depression is (which is expected, since people without mental illness often have no way to relate to the distortions/perceptions/emotions of it), and they ultimately blame the victims. They are saying "you know how empty and hollow and shitty you feel? That's your fault for not trying hard enough to be happier and more confident. You suck because you choose to suck. You are worthless by choice." Which again, helps no one and can reinforce their depressive thoughts instead.

3. "Don't take meds, they mess with your brain." Well, yeah, that's the point. People with depression/anxiety/etc. have brains that distort reality, warp their perceptions into something terrible, and motivate them to dangerous behaviors. It's good if you can mess with that and end up with healthier brain chemistry. No one ever says "don't take antibiotics, they mess with your infection". Meds aren't for everyone, and it can take time and experimentation to find the right combination and dose for a person even if it does work, but there is no blanket approach, and you shouldn't convince someone who might need medication not to take it.

In terms of ways to support someone going through things like this, everyone's different, so different things help. For me, I'm a very science-and-logic oriented person; I don't believe things unless I understand the evidence for them. When I'm having an anxiety attack or depressive episode, my brain hides evidence from me and warps others; I start seeing everything I do wrong in the worst light, and become unable to see anything I've done right. "I'm a terrible friend, I'm a terrible son, I'm a terrible employee, I'm a terrible person; everything I do falls apart and screws up other people's lives. Why even bother when all I do is fuck up?" So for me, some of the best support is when my friends point out clear, objective evidence that I am wrong. When they remind me of ways I've helped them which I'm currently unable to recall on my own, or prove that something I did for them actually mattered, or show me things I've made or accomplished and compare it to others' work so I can see I'm not the bottom of the barrel.

But that's just me. Not everyone responds to evidence like that (I'd wager most people don't); the point is to find out what kinds of distortions a depressed/anxious/etc. person is experiencing and then figure out how to convince them they're wrong about it.