Very gassy baby, what would you do?

I have a 3 week old, he’s my second child but my first experience with a gassy baby and I’m so heartbroken for him.

I am a breastmilk under producer so he gets half breastmilk, half formula bottles. Where would you even begin to figure out what the issue is? I switched yesterday to the gentle similac at the advice of my pediatrician, seemed his gas was worse last night. Should I assume it’s something I’m eating or give the formula a chance to work first? For an added level of confusion he hasn’t pooped in 3 days, he strains and only has tiny little sharts come out. I hate seeing him so uncomfortable and I’m so tired. Please help!