Ready to give up

I feel like I’ve failed as a parent. I had my first kid when i was a teen and obviously i lived with my parents, my mom was always an aggressive person she never really showed her love for me or my siblings she’s always been our bully her reason is “because thats how she was raised” we never got hugs or kisses or anything so when i was raising my daughter all she saw was my mom yelling and calling me bitches.... well my daughter grew up around that and now she treats me the same way... i love my daughter so much i give her everything in the world i just spent $1,000 on Christmas toys for her, ive been going through a custody battle with her dad and im just ready to give up and let him have her. I dont even live with my parents anymore and my daughter still treats me like she hates me. She has everything you can imagine her own room bunkbeds everything i tell her all day how much i love her and she still treats me like she hates me i dont know what to do anymore maybe i should just give up? Im tired of crying and feeling unworthy.. im also pregnant now and i can just tell you this its not bc im pregnant that she acts like this she’s been like this