If your daughter is not in therapy, I would suggest you start that now. If he's nicer to her when she talks badly about you, that is SICK SICK SICK and needs to be made known to a professional.
If he keeps emailing you stuff like this, he will end up hanging himself with his own rope. Take a deep breath (or several!), and let him do just that.
I too had a huge fear that I would end up like my (undiagnosed mentally ill, emotionally abusive) mother. That fear is gone - it vanished the first time I held my oldest son after he was born. Exercise self-awareness and mindfulness, and you will be fine.
But do please get therapy for both you and your daughter, if you haven't already. I can't say enough about having a good therapist, someone safe to talk to. Mine has changed my life.