I understand this so much. Sometimes though, when you surround yourself with the wrong people they make you feel like you've lost yourself, they make you feel lonely because you just feel so unrelateable. I'd advice you to slowly distance yourself from them BUT as you do so, gravitate toward another group of people. Join a club, or a society if you're still at university. If you just leave you will feel isolated and that can take a tole on you.
Some people here are saying just don't have any friends because it works for them, but the truth is it makes you unsociable, and doesn't allow you exercise being sociable which is already a problem for our generation because of technology and social media. It's not a good way to be, you cannot grow well without other people who are close to you.
Everything is temporary, but only if you know how to let go. By making new friends and letting go of these ones you can find yourself in a better space.
Friends teach you more about yourself, point out things you otherwise wouldn't be aware of. They challenge you to be patient, forgiving, generous etc, and as cheesy as this sounds, how else would you practise those things if you had no friends?
There are so many great people out there, just put yourself in new spaces and get out of your comfort zone. Try something new.