It probably means different things, depending on the context, but it reflects a deep ambivalence. The person is not happy. “Happy” is too simplistic a word. The person is not feeling that they're able to live. It's not that they actually want to die. Usually what it reflects is that they want to live better. They want either their suffering to be dealt with or the social situation to be dealt with.
I see it as an abandonment. If we tell people in those periods of despair, “We're going to collude with the despair that your mental illness is bringing and the hopelessness and we're also going to say that you're never going to get better, and we're also going to say—in brackets—that we're not going to help with the social situations you're struggling with, but we'll provide you with an easy and quick death”, what does that say about us?