What exact food are you giving him? low quality foods tend to have this effect. Get a crate. Dont just put him in there, make it a gradual thing, a few minutes at a time, all feedings near the crate, slowly moving the bowl into the crate, and then closing the gate after he starts eating and opening it back up afterwards. It gives them a place to feel safe/comfortable/secure. Changing every meal what you are feeding him might just be making the problem worse. Dogs can go a few days without food, but a puppy, not so much.