If you were as selfish as the OP then I wouldn't have anything different to say to you.
But...you would have been in no place to say that.
If you told me I was selfish, and I was silly enough to let what you said sway me, I wouldn't have been married to this guy for a couple of decades plus.
We're all selfish. It's not automatically bad thing.
I'm glad I'm selfish. It has given me the good life I have now, and love. Not just in this instance, but many others.
You're selfish, I'm selfish, we're all selfish.
Even if someone believes they are altruistic, living life for others, they are selfish in that they get what they want. That's ranging from getting the good feelings of helping others, the opportunity to be a martyr, the joy of feeling superior to others, of telling them how selfish they are being, etc. Our every action is ultimately serving ourselves.
Maybe this girl needed a wake up call, to realize this young man is serious. Might not happen tomorrow, might not happen at all, but now she's got information on which to base her next decision.
It's total bullshit not to tell someone how you feel about such an important emotion.
Causing someone emotional hurt is sometimes better in the big picture, if it gets them back on track to what is important.
In any event, even if she isn't interested in the OP, the emotional hurt she's gotten isn't deadly, and isn't going to last for the rest of her life. I don't think it's necessarily doing a disservice to someone causing them some pain, if it gives them something to think about. We make decisions based on pain many times. Some decide to run away or somehow avoid the pain. Others look at the pain and examines what it means. Pain is an indication there is something wrong with what is going on.
If she disliked the guy, or had no romantic interest in him, there wouldn't be pain on her side really. Not beyond the "wow, this is uncomfortable" that quickly dissipates. Real pain means decisions need to be made. She may decide to run away, avoid, but that is a decision in itself.