Agree with BingoWingoForties
You haven’t failed her op. Not at all. Hormones are rearranging her brain a bit and she is re-assessing you and your ex as normal human people who have faults the same as anyone else, as opposed to the gods you were to her as a tiny child.
This is a normal process because she has to do this to separate off from you a bit to grow up and become her own person.
You need to maintain a balance between being sympathetic and loving and keeping the channels of communication open, while also calmly and respectfully trying to get across the fact that her feelings, although sincere and valid, aren’t necessarily the whole truth of the matter within the bigger picture and that her perspective, although very important, isn’t the only one! And although it wasn’t perfect, you and your dad gave her the best parenting situation you possibly could in the circumstances and that she has two loving, involved parents.
This is all assuming that she did largely have a happy childhood of course and that her early years were not blighted by toxic arguments between you and your ex. If that is the case then she does need to see a licensed psychologist specialising in adolescent mh. It might be a good idea anyway depending on her level of distress.
But if you think objectively that her childhood was largely stable and happy, then don’t be too apologetic as this encourages a victim mentality which sm is all too ready to encourage atm.
Maybe take her out for a coffee on neutral territory and explain how your relationship with your ex wasn’t working. Validate her feelings of loss about not having her dad living at home with her like some of her friends. Don’t say that you split up to give your dd a better environment but just say generally that you were both happier after you split and it didn’t change the way you feel about her.
Don’t let her wear you down with guilt to the extent that your own mh starts suffering op, because that will do your dd no good at all.
Adolescence is at least a good five years long so it’s important you step back a bit, keep a bit of objectivity, keep your own morale up and focus on your life and interests. It’s so hard when you see your child in such distress but it’s really important you don’t buckle too!
Would it help to know that one of my DDs was equally miserable and upset with me and her dad and we have been happily married for over thirty years? This started when she was fourteen and her moods were quite volatile and angry, She’s now a really delightful, purposeful, loving daughter in her early twenties who can see two sides to an argument (most of the time 😆). So this phase will pass!
In the meantime, get yourself support from friends and family, and be attentive and loving to your dd of course, but also go out and live your life because it’s often said that teenage daughters don’t treat themselves how you treat them, but they treat themselves how you treat yourself!
Your dd is confused by her ever changing body and mind atm op. She needs a stable cheerful relatively optimistic person beside her navigating the route through the confusion. Keep strong! Good luck 💐