I'll give you a happy ending!!! I have had two close friends since 1st grade. Other girls have come into our threesome....and after a few months, sometimes even years, drifted out again. BOYS have entered our little threesome....even some that we fought over causing us to not speak for months at a time. I moved away from my 2 friends the summer before 10th grade. (I won't even tell you how hard that was.)
After all of those ups and downs, we are still "here", still "together". When we talk, write, visit, we don't miss a beat. I couldn't tell you what happened to many of those other girls or boys....but our little Three Musketeers are still around! And all of that silliness sure gives us some funny times to talk about....and we agree that we were pretty stupid sometimes.
It'll work out with your daughter. As other posters have said, just hug her, be there for her to cry to, and know that "this too, shall pass"!