Based on what you write, you may pump over Shabbat/Yom Tov to feed your baby and avoid infection. You may use an electric pump, and it should be set up before Shabbat 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 age of your baby 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.
Once your baby is at the point that he eats solids well, and you can supplement that with milk pumped during the week, you should no longer use the milk pumped on Shabbat. You should add a bit of soap to the bottle/container into which you pump to make the milk unusable.
Please see our page on
Breastfeeding in Halacha for more detailed discussion, and feel free to get back to us with any further questions.
B'Hatzlacha!