It may be that he is allergic to the new food. Allergies normally are noticed as hives ont he skin but can include gastrointestinal upset, ear infections and even diarrhea. Not all dogs exhibit all the symptoms. If his stomach is still upset he may not want to eat.
Then there might be a skin condition such as staph dermatitis or yeast dermatitis. These skin conditions are generally seen with allergies. Staph usually occurs on the lower regions of your pet and tends to have small pimple type bumps. Shampoo containing Chlorhexiderm and/or Oatmeal can help with this condition. Yeast typically shows as a greasy area that has a sweet musty odor. Sometimes the skin can become inflamed, darker and thickened due to itching. Yeast likes areas such as between toes, armpits and ears. Selsun Blue Shampoo can help with Yeast dermatitis. When shampooing, lather and leave on 15 minutes before rinsing. These shampoos are not meant to be a cure, just a relief until your pet can see a Vet. Benadryl can be given to your dog, the dose is up to 2mg per pound every 8 hours for itching due to allergies. You can read about allergies here:
You can try giving him some pepto-bismol in case he has an upset stomach and then offering him some bland food such as chicken and rice (as long as the new food wasn't chicken based). This may get him eating again. It can take as long as 6 weeks or more to see improvement after switching back to an earlier food. You will want to also check his mouth to look for a problem with his teeth. Look for broken, darkened teeth, red or inflammed gums or swelling in the mouth. These would indicate a problem and would need to be taken care of by your vet. A mouth issue will cause a dog to cry and stop eating. If you find something, buffered aspirin can be given to a dog with a dosage of up to 5 mg per pound every 12 hours for pain until your dog can be seen by your Vet. Keep in mind that a dog's body does not metabolize aspirin in the same way as a human and thus should not be given more than a day or two without contacting your Vet.
The following symptoms should trigger an automatic trip to the vet:
If your dog has acute vomiting and diarrhea lasting over 24 hours.
If your dog becomes dehydrated. You can tell by pulling up the skin between your dog's shoulder blades and seeing if it flows back down normally. If it stays tented or is slow to return to normal, your dog is dehydrated and needs fluids immediately and should see a vet as soon as possible.
If your dog's gums and tongue become pale and not their normal pink color.
If your dog's rectal temperature is over 103F (101-102.5F is normal)
If your dog becomes lethargic and non-responsive.
If your dog has trouble breathing.
In addition, if my suggestions don't help, he will need to see your vet. Sometimes steroids and antibiotics are needed to clear up skin issues related to allergies. I hope this information is helpful to you.