From some sort of (poorly-understood) utilitarian standpoint, suicide (like anything) is immoral iff it increases the total suffering in the world. Presumably a person who is suicidal is experiencing significant suffering, and thus killing themselves is reducing total suffering for at least one person, from some high value to zero. Particularly, a young person with some very serious mental disorder (severe chronic depression, type II bipolar, etc) has many years of heavy suffering to weigh. However, that person’s life may well be reducing suffering (bringing happiness!) to others around them; many suicidally depressed people are superficially happy and exert a positive influence on the people who love them.
Committing suicide both reduces the happiness you bring to those around you and also adds some grief, sadness, guilt, etc to same. It might well also reduce suffering in smaller ways (e.g. people no longer have to worry about you or be stressed about caring for you, etc), but overall it’s going to be negative. Not only is any joy you could have brought anyone for the rest of your life now gone, you’ve also introduced a lot of sadness (that will, presumably, taper off as time goes on; there’s some weighing of futures here).
So, from a very shallow understanding of utilitarian morality, and as supported by quotes such as:
Even if a person has some duty to others, say, family members, the suicide can still be morally acceptable provided the distress to others caused by the suicide does not outweigh the distress to the person who refrains from committing suicide. No person is obligated to undergo extreme distress in order to save others from a smaller amount of distress. [source]
my understanding is that this is roughly where the analysis generally leaves off. Kill yourself if it reduces suffering; don’t if it doesn’t.
But, let’s consider a hypothetical scenario where someone I love very much and who has no impact on anyone else in the world is contemplating suicide. Wave your hands and assume the calculus shows that the person’s suicide is a small net negative: thus it is immoral for this person to commit suicide; the suffering she ends in herself (integrated over her expected life, etc, etc, blah blah blah) is slightly less than the suffering increase in mine.
Now in this case I can choose, to some degree*, to be less sad about it. To believe that the end of my dearly beloved friend’s suffering is so important to me that my gladness that she is no longer in pain reduces my total suffering to the extent that the moral calculus changes: now my friend committing suicide slightly reduces the net suffering in the world, and is thus the more moral act.
What does this mean? I somehow have control over whether or not others’ acts are moral? If I tell my friend, “I will be glad to see your suffering ended, if that is what you choose, even though it will break my heart to lose you,” and she correctly infers that the moral calculus has changed to the point that it is now moral for her to commit suicide, and she is some wacky alien perfectly-rational-actor caricature, then she goes ahead and does commit suicide, have I effectively killed her? Was I right to? Can I choose, after the fact, to embrace others’ decisions to reduce their own suffering and thus retroactively justify a suicide as a moral act? Does any of this argument even make sense?
As to that last question: who cares; morality isn’t objective anyway, I get to weigh things for myself.
*Haha! Just kidding, free will is a lie. But acting as though it’s not (which of course we all must), one in fact does have some control over one’s reactions and emotions, or rather is at least able to if one tries.