Dogs have scent glands in their faces so when your dog nudges you with his head, he is marking you with his scent to signal other Dogs to keep off.
It is therefore safe to say that your dog can nuzzle you because you exhibit negative emotions, but this empathy can also extend to others.