I hear you with the heartbreaking part.
My son really never had really bad gas but at the times that he did get it he was not a happy camper.
Like your son he would wake up either partially or completely because of it.
My son is 17 months old now and (I am very sorry) I do not remember the name of the medicine that I gave him.
It was in a green box and the actual medicine was pink.
He liked the taste of it so it was not hard to administer.
I think partially the reason your son is having gas problems is because you are changing his food from breast milk or formula. (a shock to the system).
I would find a formula and stick with it as quickly as possible. Also, watch your diet until you are done breastfeeding. :)
I really like the Enfamil Lipil. It is in a pink can. It is softer on a baby's stomach.
Our pediatrician recommended it when my son had Acid Reflux.
I wish you the best of luck!