It can be. Struggling is part of life, meaning makes struggle worth it. Meaning can change ones outlook from it never ends to I can move the needle, even just a little.
Wait, are you saying my statement is toxic or the responses I'm getting are? Cause I didn't think suggesting finding something meaningful outside yourself CAN BE helpful, would be so divisive. I certainly didn't think it would be an invitation for the rude responses.
Nearly every day at work or in school, or within my friend group, someone tells me I'm valued and make the world a better place. I am doing research on something important to me, getting a degree in environmental science, just did a production as stage manager and got to sew costumes to make my trans friends feel amazing on stage, and I still get home and think about blowing my brains out most days. Last winter I hospitalized myself again hoping to break the cycle of misery, and that didn't work. I'm one of the lucky suicidal people who can leave the house and interact with other humans (some of those love me, and I love back), but even that isn't a cure. Nothing has made life worth living, and after all these years I still don't know what would.
Many depressed/suicidal folks often do give themselves to a cause or calling. Depression isn't just the episodic spiral you see portrayed as depression, it's also the hard fought days where only you can see your struggle. Along with therapy, exercise, and medication, "faking it til you make it" is the treatment plan, allowing yourself the freedom to try to function and feel better. And from experience, living for others is one of the easiest ways to push yourself to make an effort.
Unless you mean "dedicate their life to a random cause" as in "at least take someone awful with you". That's generally frowned upon advice, but I definitely understand the sentiment more than I wish.
Take the most debilitating pain you’ve ever endured in your life, amp it up to “11”, and then live with it every single day from here until you die. 24/7.
Then when you think you might have a handle on managing it, have people like yourself make such dismissive comments on how you should dedicate your life to some “random cause” instead.