Suicide for some is best solution when life backs you into corner with no way out but the government criminalizes it and part of it is financial (IRS has specific statures). Death penalty still exists for some crimes but it is a crime to decide to take your own life.
I have had some friends who have taken their own life and in most cases I understood. One was in car accident from a hit and run which put her in bed for rest of her life with tubes supplying all nutrition since much of her digestive system was ruined. Driver was never penalized. She played online gaming for a while but discovered half a life is sometimes is no life and committed suicide. She had a number of in-game friends who were sad but owner/chief moderator of game told it was a bull story where her sister who was given her login/password tried to selling her items to donate to a charity which helped her.
Suicide is not always sign of mental illness but mental clarity.