Hello, & welcome to the forum, Nothappy@uni,
Your story of your marriage & family is so very heart-breaking. I don't have any personal experience to guide my response. My parents, had a tumultuous realationship. I'm refer to my father & (ex-)stepmother. I don't remember my early childhood before he & my mother divorced. Stories differ as to why he had custody of their ckids. Now I can nevr know what happened.
I didn't like it then,& I really don't like it now, when I recall how my father would bring us in to witness how my (ex-)stepmother was behaving during some of their fights, pointing out how outrageous she was, while I think his own actions were so very unhelpful!
Eventually, as kids grow up, into adults, & (if they are mature enough( they reflect upon how they were parented. As difficult as my (ex-)stepmother was towards me, I actually feel some sympathy for her. I also see how my father contributed in his own way, not intervening to ensure she did not say the things she did. Also seeing a little how he manipulated us & her, for some personal pleasure, (I don't know), of his own.
Sadly, they both lost me. She long ago, he later, after I could not continue trying given his response.
I can only hope your daughter does, at some point, begin to think independently, & examine how supportive you were, & how your wife treated her, & she sees who has her best interest in mind & deed. If you continue to treat her with love & respect, & never try to dissuade her or tell her what to think, like you say her mother has, & don't denograte her mother, you will have a better chance of reconciling with your daughter.
I know this is not promising for the short-term, & I'm sorry I can't offer better.
All the best,