For mild pulpitis, dentists will take out any decay and fill the cavities. Sometimes dentists use a temporary filling with pain medicine in it for 6 to 8 weeks before putting in a permanent one.