I'm scared I'll be the kind of mother my mom was/is?

I'm terrified of being the same kind of mother my mom was to me growing up.
She was emotionally and psychically abusive. She'd put me down all the time. She'd tell me she hated me. She'd start rumours about me and talk badly about me on Facebook and to family members. She'd go through my personal texts and things. She'd freak at me for little things, like eating food, drinking juice or taking a bath/shower. She never hugged me or said she loved me. I was always afraid of her. She favourited my siblings and was the biggest bully to me. 
I honestly think she just had children because she liked the attention it came with, because she's really different on Facebook/in front of other people. 
And I know I'm not like that, because I've always been very motherly and loved kids and couldn't wait to have my own family. But I'm still so worried I may end up like her once I have a baby.
Also, should I feel like I have to allow my child to see her in the future? She left a lot of emotional scars on me and was the reason behind my depression and I don't want my children to go through it too..