"As we have no immediate experience of what other men feel, we can form no idea of the manner in which they are affected, but by conceiving what we ourselves should feel in the like situation. Though our brother is upon the rack, as long as we ourselves are at our ease, our senses will never inform us of what he suffers. They never did, and never can, carry us beyond our own person, and it is by the imagination only that we can form any conception of what are his sensations. Neither can that faculty help us to this any other way, than by representing to us what would be our own, if we were in his case. It is the impressions of our own senses only, not those of his, which our imaginations copy. By the imagination we place ourselves in his situation, we conceive ourselves enduring all the same torments, we enter as it were into his body, and become in some measure the same person with him, and thence form some idea of his sensations, and even feel something which, though weaker in degree, is not altogether unlike them. His agonies, when they are thus brought home to ourselves, when we have thus adopted and made them our own, begin at last to affect us, and we then tremble and shudder at the thought of what he feels. For as to be in pain or distress of any kind excites the most excessive sorrow, so to conceive or to imagine that we are in it, excites some degree of the same emotion, in proportion to the vivacity or dulness of the conception."
Modern science is saying something similar now (although I am not sure if it is the same thing exactly). It was written about in a recent Wall Street Journal article called Tracing the Origins of Human Empathy. Here are some key exerpts:
"our ability to identify with another's distress -- a catalyst for compassion and charity -- has deep roots in the origin of our species"
"our brains are built to feel another's pain"
"we may be hard-wired for empathy"
"our ability to put ourselves in another's place [may be seen in] how chimpanzees and other primates console each other, prefer to share, and nurse the injured...primates are reminders of empathy's antiquity."
"Dr. de Waal contends that empathy, sympathy and compassion are traits shared by every species with a rudimentary capacity for self-awareness."
"All mammals have some degree of it, and I think the origin is in maternal care," Dr. de Waal says. "I think mammals need a mechanism like this because a female needs to be very sensitive to emotional signals that come from offspring."
"Empathy draws us into the life of another's mind. Synapses fire to marshal sensory cues, muster memories and weave intuitions that our conscious minds could never articulate. As a visceral response to others, empathy can manifest in unexpected ways -- through contagious yawning, for instance."
"people better able to identify with another's state of mind also yawn more readily in response to others."
"Emotions are contagious, too."
"empathy arises from the interaction of our oldest and newest brain structures."
"Among our synapses, we do feel another's pain as our own, these brain imaging studies show."
"we respond more readily to those with whom we already feel a bond, either through kinship, community or racial group"
This might also be related to "mirror neurons" in our brains. One exerpt from this article says:
"These data strongly suggest that the insula contains a neural population active both when an individual directly experiences disgust and when this emotion is triggered by the observation of the facial expression of others. Similar data have been obtained for felt pain and during the observation of a painful situation in which was involved another person loved by the observer. Taken together, these experiments suggest that feeling emotions is due to the activation of circuits that mediate the corresponding emotional responses."