Need to Vent. Second pregnancy and a toddler

Feeling like such a failure. Im 35 weeks and 4 days pregnant. This pregnancy has been the complete opposite from my first pregnancy. Ive had pretty much every symptom with this pregnancy. Now that im weeks from my due date ive been having excruciating rib pains, backaches, and uncomfortable,SPD and painful braxton hicks. I have a 3 year old and its so hard to keep myself calm. Havent slept much for the past 2 weeks since my 3 year old got a tonsillectomy and the rib pain just wont let me rest. I feel like sometimes ive just lost my patience with my toddler. Lately she has got a habit of slapping my face or hitting me probably because we have been really soft with her the last weeks because of her surgery. Ive raised my voice at her and I feel so guilty now. Like im failing as a mother. My mother says that my daughter has gotten used to me screaming at her because I scream too much at her. I feel like its not true because i know i try to keep calm