It’s very, very sad but true that not everyone gets the parents they deserve. You are certainly not alone in this situation. I know that doesn’t really help but maybe knowing it will take the sting out a little. As painful as it is, your parents’ rejection of you and favoritism to others probably has nothing to do with you, really.
I wrote an article for PsychCentral some time ago called Rejecting Childhood Rejection. Rather than repeat what I said then, here is the link: https://psychcentral.com/lib/rejecting-childhood-rejection/.
Your challenge is to decide that your parents are simply wrong about you and to go about life in such a way that you can be successful and find other people who can and will love you for who you are. Your self-esteem won’t improve if you wait for your parents and relatives to give it to you. You need to start working on it on your own.
Start focusing on school so that you can both feel good about yourself and gain the skills you need to get a job and live on your own. And do let your friends be the kind of friend to you that you would be to them. I know you would comfort a friend. Let your friends comfort you. Share some of what you are going through and ask for some reassurance and help. Friends often become closer than family. Give your friends a chance.
The world is not your parents. There are many, many people out there in the world who, once they get to know you, will be the kind of “family” you deserve.
I wish you well.