From my experience a dog that knows or is ready to die will want to be alone. Most often wandering away from the yard and staying gone. If it is an inside dog they will want to go hide in small spaces or in places they wouldn't normally stay. Most will become listless or seem depressed and most often will stop eating or drinking closer to death. If you are really concerned it would be best to take the dog to the vet for a proper diagnosis.