Oh OP, it sounds like you're doing really well in the circumstances. My dad left when I was a similar age to your DD so I wanted to offer a view from that perspective. It was a bombshell for us. He stood with his bags packed, told us he had screwed up, had an affair and now he was leaving and with that he was gone. I remember being a numb, angry, and yet at the same time, oddly really worried about my dad. The world was upside down. My mum tried her best for me, but at night when I had gone to bed I could hear her crying.
I visited my dad once a week or so until I left home. They even briefly got back together which was just excrutiating as he still tried to be my dad but had lost all moral authority. School were sadly pretty useless and friends didn't know what to do so it wasn't discussed.
On a practical level it sounds silly but my mum's attempts to make herself feel better by buying a new wardrobe and having her hair done upset me a lot, I never told her but I just craved my old frumpy mum. sometimes when all the big things change you want the little things to stay the same. We moved house and I was involved in finding the new place which helped. My mum was careful not to put us in the middle at first but unfortunately that later subsided and we were quizzed on our return every time we visited my dad which was really awkward. Things were ok unless my dad actually tried to act like my dad, I visited out of courtesy but he had no authority if that makes sense! What helped me was of course my lovely mum, but also meeting my boyfriend who I could spill my heart out to (he was a keeper and is now my DH), but more than that it was a blistering row i had with my dad a few years later. I have never been so angry in my life and I told him exactly what I thought of him and had bottled up for years. He apologised for everything and explained himself, as much as he could do and I finally just saw him for what he is, a very flawed human being. I guess we all are, his flaws just happened to hurt those he should have cared about most. I am not a forgive and forget type of person but I felt so much better. Many years later now and I love my Mum to pieces, although like all good mums she drives me crazy and somehow I have a pretty good relationship with my dad too.
I guess I just wanted to wish you courage for the road ahead and to say it's a shit situation, about as shit as life can be, but it can be ok. You sound like a great mum, take care of yourself as well as your DC.