I agree with Margot and lindapalm. Yellow where the whites of the eyes should be could be liver failure. It's at least acute jaundice, which could be caused by many things. The cause for it needs to be found and treated.
I hope he will be ok.
Your dog is sick and suffering, do not wait any longer, take him to the vet.
You need to get your dog to a Vet ASAP! This does not sound good and the yellow in the whites of the eyes can indicate a liver problem or failure!