I agree that the yellow bile is likely from an empty belly. My dog used to do that when she was off her food. And yes, your dog can sense your anxiety and stress, so you going away upset could well upset him.
I agree that a trip to the vet to rule out any type of bug would be well worth the $$. If the vet rules all things medical out, then your dog will likely eat when things go back to normal for him. Don't pressure him, don't sit and stare at him to see if he's eating. That will just put more stress on him.
Good luck and keep us posted.