Gas advice??

Can anyone share advice for gas/constipation for a newborn? My little guy is 4 days old and he tries to hard to push either gas or poop, but can't seem to do it. It's to the point where it's hurting him and making him so restless and tired he just passed out. I've tried bicycles and the tummy massages, but that's all I know. I don't know if I'm able to give him gripe water just yet either.

Edit: I forgot to add, yes I am burping after every ounce or so. I bought a slower flow nipple, and I went to my pediatrician yesterday. Hes okay, but they agree he shouldn't be in so much pain trying to poop. So for now I'm just helping him how I can, and watching his bms.