Yes, it is a purely selfish act. You already say that you know that it is at the expense of another person.
And it is likely futile. except if it is your intention to damage, if not outright ruin the friendship.
You will find that having good friends is far more important than a girlfriend. And you have such an obstacle to overcome even IF she might share feelings for you. But if she doesn't, and you are really her friend, she doesn't have romantic feelings for you and unlike grade school, telling her you "like her" does not automatically make for reciprocal "like". And you risk being deemed creepy.
My advice?
Maintain a foster a real friendship with her. If in time, things change, she may find your arms comforting.