I nearly shook my baby 😭😭😭😭

I'm so tired!! For the past 3 nights my LO has been up from 2.30am and nothing I do works. He screams if I hold him, he screams if I put him down. 
I don't know what to do anymore.  I could feel myself getting rough with him when I was trying to change his nappy so I took 5 minutes away but by the time I came back he was inconsolable.
I picked him up and in frustration nearly shook him. I'm so scared I'm going to hurt him sometimes. I need help but can't ask for it. I don't know what to do I feel like the worlds shittiest mum. Its not his fault but I just get so annoyed with him.