How to help my milk dry up

I have had to abruptly go on a medication that is unsafe to use while breastfeeding. My son has been exclusively breastfed for the last 6 months and is taking formula like a champ but I am so engorged and in so much pain. What can I do? I'm afraid I'll end up with mastitis :(