It's just like when babies are teething- they don't feel good.
Maybe you could give him wet food, or soften his kibble up with a bit of water.
Poor guy, I hope he gets his appetite back soon
If he's acting really lethargic I would be worried.
And maybe try to get him to eat something so his blood sugar doesn't drop.