Empathy is like sharing an experience.
Alice is holding a stack of papers, they get a papercut and react (yelp, pull their hand back, maybe suck on the injury). Bob sees Alice's experience and may remember when they had gotten a papercut before or just imagine what that experience is like, and will share in the same feelings (or how Bob would imagine Alice is feeling, anyway). Bob may yelp too, or fidget with their own (uninjured) finger.
https://github.com/hashicorp/envconsul