Have you talked to your vet? If someone calls with these sypmtoms and acting like painful mouth we always recommend coming in for dr to look.
And while the average healthy adult dog can go 12 hours safely with no food.
There are actually dogs that will starve themselves before eating something they dont like.
There are also many medications we send home that require a stomach protectant for this exact reason.
You are welcome to pm me if you want more info