"You can be the ripest, juiciest peach in the world, and there's still going to be somebody who hates peaches." ― Dita Von Teese
Maybe they don't specifically hate you but there is always someone else they will choose over you even when you gave so much of yourself. The point is that giving the most doesn't always mean you get the most in return. People are selfish creatures and will choose what they want despite everything else. That does not lessen your value as a person or as a friend.
I had a mentality that maybe if I gave someone my all, that person would be my best friend and we'd be each other's favorite person. I believed in this regardless of how many times people let me down. I wanted so badly to be someone's somebody that I allowed them to come and go as they pleased as long as they returned. People ignored me for months but I came back in a fraction of a second when they needed somebody there.
In my mind, the two options were to give your all or not to give at all.
Turns out that mindset only works on materialistic goals. Goals that don't have a mind of their own. It is a nonverbal agreement that those goals are there as long as you work hard but friendships and relationships aren't set in stone.
It took me this long to realize that you don't have to be the best person in someone's life to be a good one. You can still be a part of their support system without having to give up moments of your own life. The truth is that we might never be someone's number one but that doesn't mean we won't be loved and have wonderful friendships.
It's sorta like having millions of dollars. You might not be a billionaire but you stay have so much and it's all worth something.