You didn't beg her to stay, you did't buy into what she wanted you to buy into (her martyr role), you may not have thrown her out but in a way.....you called her bluff....she didn't expect that, she didn't get her way. It certainly doesn't hurt that her friend talked to her as well.
Next time, and unfortuantely there probably will be a next time because this is very likely a temp change in her behavior....that she does that (threatens to leave or gets that way with you or your daughters), get her suitcase out and offer to help her. I say that because you don't want her to think it's ok for her to pull that crap either.
Hopefully though she doesn't want to lose what she has and is taking a closer look at herself.