Thank you for your query.
You shouldn't have switched the diet before 6 months of age.Do you breastfeed your child?.Formula feeds are only meant after 6 months of life.
He is having food intolerance
.Switch your formula to the previous one.Give him some antispasmodics and some probiotic
He should recover in a few days.Hope this answers your query.Wishing your child a speedy recovery.Have a nice day.