Well, take it slow. From my experience, I moved from 8 times--> 7 times-->6 times---5 times--->4 times--->3 times---2 times (morning and night) then only the morning. in that case you will never experienced any pain or discomfort. It takes about 2 months in total to gradually stop breastfeeding.
It works for my two babies, I never had any fever or swore, and both of my babies were fine with the cut down on breast milk. I first sub-situated with formula for the night bottle which will give me a few good hours of rest and then breastfeed when they wake up at night, that will normally put them back to sleep until early in the morning. but hey, you will have at least 4-5/6-8 hours rest at night. It vary with different babies.
Breastfeeding was not and never easy for me but I truly enjoy that intimate moment with my babies.