I experience something like this, too, and I think it's part of that black-and-white thinking that comes with BPD.
It's worse with some people than with others, but often times I go through something like what you described, where one moment I'll be super worried about my friend and whatever they're going through and the next I just don't care, or I'll be angry that they're prioritizing their own issues over mine. I know it's unfair to them because they definitely have to take care of their own well-being first and foremost, but unfortunately, that sort of problematic thinking is way too common with a disorder like this.

I think the main thing is being able to manage those emotions, even if you can't control when they pop up. I'm constantly reminding myself that it's not a competition and that my friends can have problems, too, and even if I don't feel as worried as I should I try to be there for them. If it comes down to it, I know when to take a step back, too. It's impossible to be there for someone 100% of the time, and sometimes you'll do more harm than good by trying to support someone when you're in a bad mindframe yourself. In those situations, I try to be honest with the person and tell them that I care about them but I'm going through things, too, and I need to get my thoughts sorted out before I can be there for them properly. Often times they understand, and the situation works out all the better because of it.
She/her or they/them. 18 years old.
[ Depression/bipolar, social anxiety, BPD, OCD ]
You are what you love, not who loves you.