Poor little guy! I would probably fast him before trying him on pumpkin or anything else. Just let him have water until tonight at the earliest, or even tomorrow morning. Then try him on pumpkin or on something like rice which is also easy on the stomach. If his symptoms don't get better in the meantime I would take him to the vet.
Here's when to take a vomiting dog to the vet:
When to Take Your Vomiting Dog to the Vet
If your dog suffers from chronic vomiting, or if she shows any of the following symptoms, take her to the veterinarian right away:
If the dog is vomiting more than 2-4 times a day.
If the vomit is foamy.
If there is blood in the vomitus.
If the vomitus is foul-smelling.
If the dog is weak or dehydrated*.
If the dog's belly is bloated.
If the dog is restless or panting, or seems to be in pain.
If the dog has a fever.
*To check for dehydration, pick up some skin on the back of your dog and let it drop. If the skin does not return to its original position immediately, it means dehydration.
From here:
Vomiting in Dogs | Causes and Treatment of Dog Vomiting