I don't think dying by suicide is selfish. I don't think the word "selfish" should even enter the discussion.
What has kept me hanging on by my finger nails at times is that I know that however unbearable my pain, my kids would, at least at some point in their lives, believe the pain was more important to me than they were. I do not want them to have a life with an intensity of pain that I have (through abuse, not suicide), so I won't do it, even though it's often the most soothing option out there.
I've got a close friend who is in her 70s and her father died by suicide when she was a child. Without any doubt it influenced - negatively - almost every single part of her life until today.
When children don't feel important to their parents it causes them pain. Suicide is, to a child, the most extreme manifestation of that there is. Healing that wound can extend their entire life.
So people could then call it a selfish act. But I still think they're misunderstanding what is going on.
Still, nothing like condemning people who are a) mentally ill and b) no longer here to contradict you!