Help, I need to break this negative habit!

So when my 8 month old daughter gets unreasonable, or takes forever to fall asleep, or wakes up super early, I have this habit of mouthing off to her cuz I know she cant understand me. And I get that babies sometimes pick up on tones of voice, so I feel bad after but I'm not sure why I do it in the first place... Im just so tired all the time and I dont want to feel this resentment towards my husband or my baby at all... I even find myself venting to her while we are alone because I have no one to vent or talk to... Should I talk to a therapist?