The most common treatment for mites is medicated shampoos and liquid medication applied topically. You will also need to make sure that your dog is getting the appropriate nutrients that it needs.
You can get an over the counter mite remedy at pet stores, but you would probably be better off getting something from your vet. They can give you medicated shampoos and better medications to get rid of the mites.
You should take your dog to a Vet as soon as you suspect it has mites. Your Vet will probably prescribe an insecticide and perhaps an antibiotic ointment or cream.