Your dog has either ingested a poisonous substance, or has kidney failure or another serious issue. Your pet may have a serious problem with parasites. Your dog needs help.
You should check that the collar is not too tight! Do not feed your dog with food scraps and make sure that your dog does not live with poisonous plants that he can eat. And if the dog does not heal, it is best to take him to the vet.