I'd say mixed feelings. It's selfish in as much as we do it knowing it will likely cause deep upset to others. But, even knowing that, we put our our needs first.
Having said that, I don't see it as selfish as someone who performs an action to gain something. I think that's why we're selfish in life mostly. But, I think people who suicide are usually trying to escape something- it's hardly selfish to want to escape pain and suffering.
I also think the very action of bringing a lifeform here- knowing how difficult life can be and then, expecting it to stay here- even if it is suffering- is also very selfish in its own way.
So- our actions would be selfish on the one hand. But, only in response to the selfish actions of others. Two wrongs don't make a right but, to some extent- I think you reap what you sow. You shouldn't even expect a sentient being to necessarily thrive and be happy in this world. There's more than enough to go wrong to create intense suffering. It shouldn't be a surprise if some people feel like they can't cope or, don't want to.
Which, to some extent, raises the question of whether we have the right to feel so upset about suicide in the first place. I think it's probably something that's hard to control. We do mourn for people when they die. Suicide does seem to create more intense emotions though.
But- maybe it's those emotional responses we ought to really be thinking about. People sometimes feel guilty. Do they have cause to ultimately? In which case- do they have the right to feel annoyed that their (possibly) abusive or neglectful behaviour has lead to consequences?
They sometimes feel angry too- with the person that took their own life. I think partly- that they weren't stronger and partly, because they exposed them to all that grief. But then- it comes to: Do we owe them? Do we have an obligation to them to be stronger than we are? Should we have put their needs above our own? Because I think that is ultimately what it comes down to. One person is going to be stuck with the pain.
But, for the suicidal person- their pain is a current reality. They can only guess as to what the grief at their suicide will do to others. Some indeed may be able to get over it better than others. So- I think there's that element too. If we're weighing up our suffering vs. their predicted suffering- I imagine for many suicidal people- they likely believe their current experience many times worse.
Which- as others have pointed out- sheds light on the selfishness of those who insist they still stay alive. How is that anything to do with love? To insist we remain alive and suffer- just so that they don't have to experience grief.