Not necessarily. Suicide is only selfish if you have people in your life who would be seriously affected by it. I don't think a man with a family should ever kill himself, for instance. But, surely there are many people who commit suicide have very few, if any people in their life who would be seriously bothered by it (homeless vets, for instance). Regardless of this point, I would argue that it's immoral or even abhorrent to insist that a miserable person "must go on living" simply because it will make others happy, especially if the people in their life are unable or unwilling to help.
People never seem to consider the alternative that their loved ones may have spent their entire life in despair, is that really any better? To add to this, I'd actually say it can be cowardly to not kill yourself. Let's take Robin Williams for instance. Personally, I think he was a hero. He was suffering from psychotic depression due to lewy body dementia, and things were only going to get worse. He took the courageous act of ending his life before he, and those around him, were seriously affected by his worsening condition. He left on his own terms and maintained his dignity and legacy. It can be cowardly to cling to a life that isn't worth living; not all lives are worth living. This obsession the west has with "life must go on" and "the sanctity of life" is absurd to me. Some people simply get dealt a ****ty hand (or many ****ty hands) in life, denying this reality and marching on seems foolish to me.
I should clarify at this point I do think suicide is only worthwhile when you've sincerely tried and exhausted all other options, and have been plagued by unrelenting despair for very long periods of time with no reprieve. I can tell you right now, there are many scenarios warrant suicide: dementia/severe brain damage, extreme bodily harm (loss of all limbs, loss of sight), a lifelong prison sentence, just to name a few.
If anyone is feeling suicidal, procastinate. Put it off until tomorrow as long as you can.