All of my parents' cats have been very attentive to bad states of mind in people. My sister has social anxiety and suffered from depression for a long time. All of their cats both past and present would/will pick up on this, and come to her, to snuggle and purr. As aloof as cats can seem, they do have a drive for companionship, and not just for food or snacks.
A warm, purring cat on your lap can be surprisingly therapeutic.