There is a statement sometimes posted by mnhq which is also good advice for real life.
I'm paraphrasing probably
But
Never to give more of yourself in any way than you can genuinely afford to, be that financially, time or emotionally.
That's a good lesson to teach your dd ASAP, especially when girls and women are so heavily socialised to be "nice" and prioritise the needs of others over our own.
It's difficult, I had a similar situation with my dd around the same age except the "friend"s DX was depression with threats to self harm. Awful.
I found out the hard way trying to "ban" dd from being friends with the girl didn't work, much as I wished it would. Several times I'd had "words" with the mother too because I too felt she was palming her responsibilities onto dd.
Eventually I took the tack of building dds confidence in saying "no" and setting her own boundaries so that dds mental health wasn't being as affected.
But I must admit I was glad and so relieved when there was finally a big bust up which the other girl couldn't excuse on her mh (they were a tight little group of girls that were friends and she stole something sentimentally precious from one and damaged it). Pure vindictiveness done out of temper and that was that she was out!
Dd sees her about sometimes but they're no longer friends and she has properly gone off the rails since.
So yea, support dd, have lots of discussion about boundaries and looking after her own wellbeing as a priority and keep lines of communication really open.
In my case school were bloody useless as it suited them for dd and the group to "manage" her and keep her calm and relatively well behaved. That still pisses me off!
But every school is different.