A former BF had a Yorkie several years ago that had been rehomed because the original owner abused him. (KICKED HIM

which caused brain injury and subsequent occasional seizures. Had a Yorkie living outside in a pen!)
He was a sweet little guy

and those seizures were horrible to watch. He was on meds off and on to control them.
Sounds like either the infection itself or an accompanying fever may have attacked the brain. Make sure you get all his meds down him so he can get it cleared up. Also, would be wise to have him checked for hypoglycemia.
If he isn't willingly eating or at least trying to eat by tomorrow, I'd call the vet. Especially since he needs to get his meds and keep them down.
Good luck!