This is a difficult question to answer, since I do not know whether you are asking about a dog's spirit (its personality) or whether you are asking about supernatural beings like angels or demons. Dogs do get upset and studies have shown that they are capable of a variety of emotions, although currently, there is no way to fully understand those emotions, since dogs do not speak like gray parrots can or use sign language the way certain trained gorillas are able to do. Dogs tend to respond to the moods and emotions of their owners, so if you are having a bad day, your dog may pick up on that.
If you are asking about angels and demons, it should first be noted that there is no evidence such things really exist-- they are part of some beliefs that certain religious people have. Dogs are not known to understand religion, so there is not much likelihood that a dog worries about salvation or thinks about sin. And there is also no evidence that dogs believe in angels, ghosts, or demons-- those are human beliefs, and current science does not show that animals share those beliefs. Dogs tend to be upset by actual events, not abstract ones. If they are upset, it's not a spirit causing it, but something in the dog's life that is bothering him or her.