I’m such a bad mother idk what to do

I’m now a mother of 3 I have a newborn of 3 weeks. It’s definitely stressful at times and I feel like today I lost it with my 4 year old . We have struggled with her a lot because we constantly have to tell her to go to the bathroom and 90%of the times she has her accidents we have talked to her and we have done everything and til this day nothing has worked. I have been stressed out because I’m constantly washing her clothes I’m washing blankets I’m washing the couches because they get peed on and today I lost it I spanked her I’m currently in the car crying because I’m such a bad mother because I’m stressed because I’m tired I don’t know what to do anymore. I feel so because she’s my baby she’s my first born I’m just tired idk what to do 😣😖☹️