Being unable to pee is a life threatening condition. If your dog is unable to pass urine, this could indicate a blocked bladder. Call your vet for advice ASAP if your dog is having trouble peeing.
Separation anxiety is a common behavioural problem that can have a big impact on your dog's life. Fortunately it can be improved and often completely cured with the right training.