I've met people whose depression made them incredibly self-absorbed. It made communicating difficult because their feelings were always centre stage and mine were never validated. In a way, I could understand it because depression is such an all-encompassing illness. It's very hard to see other people when you're in a lot of pain. On the other hand, those relationships were harming me, so there was a limit to how far I could take them. I know that it's terrible when you're depressed and your friends turn away from you but I also couldn't be just a sponge for another person's emotions. Not long-term.
So it's a difficult question for me. But you are not selfish for being depressed because it's not a choice. You've just been dealing with a bunch of people who don't understand depression and are unequipped for dealing with it. They are wrong to shame you. It's probably best to enagage them as little as possible and seek professional help (e.g. therapy).
Leonard Cohen (Bird on a Wire): I have tried in my own way to be free
Mrs Hudson (BBC Sherlock): Sherlock! The mess you've made!