13 month old not eating

He is teething like crazy and not eating or sleeping. He only wants his formula. Will he be ok? He is under weight as is so I'm freaking out a little