Is it wrong

Sometimes when my 3 mo is crying I just can't take it and leave the room. As I type this I'm at the other side of the house smoking a cigarette while he cries. 
He's been crying all day and sometimes I can't take it... I feel like such a shitty parent