It sounds like your dog is in a pretty serious state. I wonder if he could have gotten into something poisonous. If you have not already I would get him to the vet. It sounds like something is seriously wrong and he probably needs antibiotics before his condition gets any worse.
It sounds like your dogs immune systems is very bad, bring your dog to the vet, get medicine ASAP. Also see. It is possible your dog ete poison or was bit and is allerigi to something check to see if he has any ulcers in his mouth and on his paws.