"Snap out of it!"
What to say instead: "I don't know exactly what to say, but I'm here."
don't mean to complicate things but an utterance like this might just trigger a chain reaction of unstoppable despair. a person struggling with suicidal thoughts might interpret it as,
"so this is life, no one really knows what to do, what to say, there's nothing and no one to trust, and i'm completely alone in this" and so on. rather than feeling comforted they may end up feeling even more isolated and hopeless.
"Oh, well, everyone feels like that sometimes."
What to say instead: "That sounds really heavy. I'm here to support you however I can."
personally, i might prefer to hear the former, because it could make me feel less alone. during moments of deep suffering, a person might actually be seeking some kind of external validation of their self-sabotage, a need to be convinced that they're causing their own pain. but if we go with the second phrase, they might come to realize that their pain isn't self-inflicted, and that bad things are actually happening to them, and that realization could trigger even darker, more hellish mental spirals.
in the end, there really is no single correct way to approach a depressed person, because we can never fully know who they are or what they're thinking. so, any word has the potential to be the wrong word.