If you are having a bad day and are emotionally upset and your dog comes over and lies on top of you, be it your feet or lap, what does it mean? To the human it is very comforting. We feel that our dogs care and are trying to make us feel better. That's the human side of the equation.
What does it mean to the dog? Dogs do feel human emotion and since they are pack-oriented animals that need to know who the strongest being is so that being can run the pack, they see the weak as lower. It's instinct and there is nothing we can do to change that. A dog will pick up on a human's weakness and will claim that person as their subordinate by lying on top of them, be it their feet or their lap. Sometimes a dog will lick the person. In the dog world the leader is on top. The leader will often cover up the lower member by standing over them.
It is not realistic to say a human who owns a dog can never get upset. But it is a fact that when they do the dog will feel the human as weak. Different dogs will have different reactions. Some may become worried, stressed, anxious and/or upset because his leader is now weak and/or become empowered and try to "save the pack" by taking over. If you are emotionally upset and a dog comes over and lies on top of you, send the dog away back to his dog bed (or other area). Do not allow the dog to get on top of you. Try and take deep breaths and do your best to not be upset anymore. But to say you can never get upset is not going to happen, so you just deal with it when it happens and don’t allow the dog to be "in your face" or standing over you during that time.