He sounds sick very very sick dehydration can kill a dog very fast within 24hr if it gets bad. He needs to see a vet now it is know a life or death situation, he urgently needs a vet.
Your dog sounds very sick, and miserable. Do not wait any longer, take him to the vet,he will not last long if he is not drinking fluids.
He is feeling really bad. Whatever can be wrong with him , it sounds as if it has already gone far enough to make him desperately miserable.
He needs to see the vet urgently.