After trying tons of different formulas and dealing with severe reflux and milk/soy protein intolerance we wound up on Elecare which causes constipation. I often feel like we continue to trade one problem for another. Our pediatric gastroenterologist prescribed lactulose for the constipation... We are still tweaking his dose as he continues to strain, grunt, push and cry sometimes BUT it's improved over where we were with 48+ hours without pooping. She also suggested that if he went too long and was in too much pain, we could stimulate his anus with either an anal thermometer or a q tip with Vaseline. Although we were cautioned to not do this too frequently because their bodies can learn to expect this stimulation to go and they will stop doing it on their own (she did say this "learned" behavior would take a while since our LO is so young).
I'll warn you though... If you do stimulate and his poop is loose, it will come pouring out... We've had "poopsplosions" all over everything! If it's firm you may want to inquire about a dose of lactulose which will help him go and soften his stool. Plus, it's safe for longer term use than a medicated suppository.
Trust me I feel your pain... Watching them struggle and cry out in pain is heart wrenching! Good luck!