Based on what you write, you indeed must continue to pump over Shabbat and Yom Tov to prevent your getting an infection. If you have an electric pump, this can be set up with a timer. To avoid halachic problems associated with its use, you should have the pump on your breast before the timer goes on.
Using the breastmilk that you pumped is a greater halachic problem. However, in light of the young age of your child and the rabbinic nature of the prohibition (if you pump as above), it would be permissible to give the milk to your son for the meals of that day.
Please see our
article and
video on this topic for a more detailed discussion.
We hope you are working with a lactation specialist to try to get your baby back to full breastfeeding.
Ketivah v'chatimah tovah!