I've had days and even phases I went through feeling this way. The only reason it changed is because friends and some family talk to me like I'm there therapist since that's what I'm studying for in school. I kindly remind them I'm not and I can only be their friend.
But before I was really on the right track for this career I was in this same situation. I am someone who genuinely wants to support, help, and be there for those who need it. They don't even have to be a friend! I just love helping. There are times I have nobody at all and wish I did...I would give anything to have someone be there for me. I hate that feeling and I don't want anyone else to feel that way if I can help it.
I'm sorry you feel that way with your friends.

Have you talked to any of them about this? Could it be you make yourself too available? There is such a thing as having a Codependent personality where you tend to be a caregiver and want to take care of people, help out, and make things better. If you're not doing that, you feel useless because there is not enough meaning or other purpose to live for.
Have you tried looking into volunteer work? That may help. I recently looked into an organization working to advocate for foster children because I realized I lacked purpose in my life currently.