Sounds like he's going through separation anxiety.
Are you sure he's not eating or drinking anything? A dog doesn't usually starve himself, even if he's upset. He may be sneaking food.
Is there water available 24/7? Is he showing signs of being ill, vomiting, diarrhea, lethargy?
Try a special treat, rice and chicken, or wet dog food. Something he can't resist.
If this problem persists you'll have to see a vet.