I feel really sorry for you. I’m so sorry to hear that your daughter is going through a MH problem. I think your friend was completely wrong to tell her 10-year-old DD. You sound like a lovely mum, from the way you describe your daughter as “amazing, wonderful”, and it’s to your credit that in five years of this situation you didn’t tell anyone, up until this one person.
I think the really important thing at this point is to make it very clear to your daughter - as you have probably already done - that you are really sorry, you completely understand why she is so upset, and that you will never tell anyone else without her permission. Everyone messes up sometimes, but how people follow up on that makes a huge difference. Some people get really defensive, don’t admit they’ve made a mistake, and don’t acknowledge how hurt someone is because that would involve admitting their mistake. That whole scenario adds more hurt to the hurt person. You sound not like that at all; you’re obviously genuinely sorry and I’m sure you have conveyed that to your daughter in a way that shows you respect and validate her feelings, and that you are committed to respecting her privacy.
If you feel comfortable doing so - obviously you are best placed to judge whether this would be a good idea - it might also be good to talk to your friend, explain that your daughter is very upset, and make it very clear that you don’t want her to tell anyone else and that she should have a serious talk with her DD and tell her not to tell anyone.
You genuinely sound lovely. Very best of luck sorting out this situation! 💐