I completely understand what you guys are talking about like that was me for a long time, I used to do this thing where I would wait for one of my friends to start talking to me before I would talk to anyone called it something like a "True friend test" or something, very unhealthy, didn't do good things for me, would not recommend . You're emotions are valid and it sucks to feel that way.
This kind of thinking is going to rip your mental health to shreds. What I think you're doing is putting effort and attention into relationships that the other people don't intend to return, nor can they. A really great visualizer for this concept is a quart jar and a cup. If you, the quart jar, are pouring everything you have into the cup or another person/ friend, it's going to over flow. the cup physically can't hold it all, so when you're asking for the same amount of effort back they give you what they've got but it's only a cup, everything they have is going to leave you feeling empty. There is nothing wrong with being a jar or being a cup, both have their place, both are necessary, but as a Jar you have to understand that you can't give the whole quart of friend ship to a cup and expect the same thing back. Some relationships are cups, in fact most relationships are cups, so you can't give your all to everyone, you can't expect everyone to give their all to you, or maybe their all just isn't the same as yours. It's not healthy, it will have you feeling alone, unseen, unappreciated, and empty.
That's not your fault, we want to give our all in friend ships, I know I do, and usually we're not taught how to balance relationships, but there has to be balance or it's unhealthy, and draining. If you do it enough, you end up not having enough energy to fill a cup, We get emotional burn out. Then you have to take a step back and recharge and that means losing people and relationships ending . Some of those can be rekindled, some people will stay by you when you can't give them anything and help you refill, and that's amazing but it doesn't always happen. Some times it is a very very slow process of self care and taking care of yourself emotionally and you refill that energy drip by agonizing drip. It Sucks, but if you don't take care of yourself you have to do that and you have to let a lot of people go, or they'll let go of you, and it's really really painful.
There are always going to be people who want to be casual friends that you desperately want to be close friends with, you can't be close friends with every body, some people will only ever see you as a casual friend for one reason or another no matter how hard you try, and eventually that trying is going to rip apart your mental health. I'm not telling you to stop being friends with people. I'm recommending you do some thinking and figure out if these relationships are cups or jars, and if they are cups, only give them a cup of effort. I am Recommending you look at yourself and see if you have anything to give right now or if you need to step back and refill for a while.
But I mean at the end of the day I am not a professional, nor am I studying to become one. I am a random person on the internet who has had experience and is attempting to share it. All that really matters is what ever helps you.