Feeling like a bad mother

Sometimes I feel like a horrible mother when my 1 year old daughter starts screaming and crying for no reason to be picked up I get frustrated and I don’t want to hurt her or anything which I never would! But to keep my cool I put her in the room and I shut the door until I cool down. I feel terrible to do it but sometimes it’s stressful and I’m pregnant with my 2nd daughter I’ll be 28 weeks tomorrow. I feel my daughter will think I don’t love her by doing that but it’s only way for me to cool down.