My baby is breastfeeding and know he wont take the bottle! Help

Ana

My baby will be 5 month the 4th of this month. I want to the doctor today because he stool are mucus and a little blood in it. She told me he is allergic to dairy, she gave me two options to do formula fed or keep breastfeeding and stop dairy myself but it wont be out of my system for 2-3 weeks.. i wanted to try formula because I think is the best option at the moment but he wont take the bottle at all..