Oh you must go. It's so lovely that his daughter has invited you, and to not go / do something separate sets a precedent that family things moving forwards will be political and separate. And that's miserable.
Thank her for inviting you and tell her that it meant a lot to you to be included, and congratulate her on her achievement.
You will be totally bricking it I'm sure but if you can do that you'll be proud of yourself I'm sure. If you are feeling brave, go and talk to her mum and say you're nervous but you thought that they were both very generous to invite you. And how brilliant the achievement is etc.
A few years ago I had to negotiate getting my parents to meet each other for the first time in 17 years (of total no contact) because I was getting married and I wanted to invite them both. Mum was so scared she was shaking (emotions only I hasten to add!) and Dad was very quiet, but they did it and they met each other's new partners. They all chose to attend our wedding and my mum and dad even danced together. I can't tell you how much it meant to me that all of them were being kind to each other, and that now I can mention them all to each other without politics. They recently all met up at my Nan's 100th birthday, and occasionally chat. It's such a relief that I don't have to tiptoe round them all and for every family event to feel like some kind of Cold War thing.
As the child in that situation (albeit a grownup one) I am so grateful that now they talk and can have a chat with each other's other halves. Going to this event and being kind to the ex and her daughter, being nice, being a non-threat, a non-political event - you will be doing such a kindness to your partner's daughter.
For this reason alone, go. Tell your DH to keep you company, and if you can't stay for long, that's fine. But going, and being nice is a lovely gift you can give to someone who has had to deal with a parental separation. Swallow your nerves for the sake of a teenager who deserves to have a good day and to have those who love her around her.
Good luck!