5 1/2 months pregnant and now single .

I was with this guy for almost 5 years and have been through so much with him ... he cheated on me the entire time & im just so upset with myself for getting pregnant still ... all I wanted was a baby by someone I loved now look at me .... according to him I’m a “dumb ass” for staying & I mean I suppose I am , why did I get pregnant and stay for so long knowing he had another girl pregnant , why did I stay when I found him in bed with another girl , why did I let him manipulate me to thinking a baby would change us ?? I grew up in a broken home and I just wanted a family ... now I’m going to bring a daughter into this world ina broken family like I did & I feel so terrible about it ... I just need some encouraging words & advice 😞 I’m upset I did this to myself and my baby girl .