Alergies

Amanda
So my baby boy is 2 months old, two weeks ago he was really fussy and crying a lot, I could tell it was from pain. He was always very gassy but that day was just too much. Took him to his pediatrician and apparently he is sensitive to cow's milk protein. I breastfeed so everything I was eating with dairy or eggs in it  was causing him extreme pain😞 
I don't drink milk but obviously I eat things made with dairy ingredients. 
So I was devastated because I really wanted to keep on breastfeeding. Meanwhile his pediatrician gave him a formula for this sinsitivity, and he's been much better. She told me I can go back to breastfeeding but I have to cut every dairy food or ingredient of my diet. I don't mind the strict diet but I wanted to see if anyone else went through this or similar? Were you succeful?