My puppy isn't eating!!

My puppy is 5 weeks old and isn't eating. He threw up some of the food he ate in the morning. I've been feeding him formula and a little bit of food included. But I'm very worried, don't know what to do. He slept all day today.