The problem with suicide is that it means society has failed to incorporate and encourage the distinct worldview and perspective the suicidal person could have provided.
The only case where suicide is acceptable is when there is an acknowledgement that one's continued existence is inequal to one's continued life. Cases where medicine is incapable, brain rot, and the like.
And this would include societal ills as well, where a person can be so thorougly abused and outcast they find more solace in death than in society, except that such acceptance is an acceptance of its own failure. This is not a good thing.