Milk drying up

Nicollette
I decided to switch to formula due to being in so much pain with breastfeeding. I first switched to just pumping and giving him a bottle and became depressed because I felt like I was missing out due to having to pump every 3 hours and I kept getting clogged milk ducts. My question is how do you get your milk to dry up and how long does the pain last? I'm on day 3 and  still having a lot of pain.