Pain Meds and EBF Just Venting here!

Ivy
My little girl is 1 month old. I have been exclusively breastfeeding and also pumping since she had a really rough start. I recently broke my ankle and my heel bones. My foot is really torn up. So I have been on a cocktail of different medication, which is usually safe for breastfeeding, if they are taken alone. Not together. I had been noticing she had gotten Really fussy. She is also very agitated, so I gave in and let her have formula. And the agitation instantly went away. I called her pediatrician and they want her to have formula, but they want me to pump to keep up my supply. I am very upset. I wanted her to never have anything but my milk, but I also want to do what's best for her! I'm not giving up on this journey!