Empathy is having its moment. The ability to feel what another person is feeling, from that person’s perspective, generates lots of press as the ultimate positive value and the pathway to a kinder, less violent world. Schools across the country are teaching empathy to children, and myriad books explore it from every possible angle: how to get it, why it makes you a better person, how its absence can breed evil.

Empathy is exalted by thinkers from Zen Buddhist monk Thích Nhâ’t Hąnh to British writer Roman Krznaric, who just launched an online Empathy Museum where you can virtually step into someone else’s shoes. Established scientists like primatologist Frans de Waal and developmental psychiatrist Daniel Siegel explore the deep roots of empathy in animals and its essential nature in humans. Even the business world exalts empathy as a way to ensure the success of companies and their products, with design firm IDEO leading the charge. We are exhorted to examine our empathic capacity and instructed how to develop it in ourselves and in our children.

It is normal and necessary to be tuned in to someone else’s feelings, especially when one is very close to that person. In fact, giving—and getting—empathy is essential in intimate adult relationships. “The empathic understanding of the experience of other human beings is as basic an endowment of man as his vision, hearing, touch, taste and smell,” observed noted psychoanalyst Heinz Kohut. The desire to be heard, known, and felt deeply never disappears. But when empathy becomes the default way of relating, psychological well-being is impoverished.

Where sympathy is the act of feeling for someone (“I am so sorry you are hurting”), empathy involves feeling with someone (“I feel your disappointment”). It also differs from compassion, which is a caring concern for another’s suffering from a slightly greater distance and often includes a desire to help. Empathy involves not just feelings but thoughts, and it encompasses two people—the person we are feeling for and our own self.

To put ourselves in someone else’s shoes, we must strike a balance between emotion and thought and between self and other. Otherwise, empathy becomes a trap, and we can feel as if we’re being held hostage by the feelings of others. The art of empathy requires paying attention to another’s needs without sacrificing one’s own. It demands the mental dexterity to switch attunement from other to self. What turns empathy into a true high-wire act is that its beneficiaries find the attention deeply rewarding. That puts the onus on us to know when to extract ourselves from someone else’s shoes—and how.

Recognizing and sharing someone else’s emotional state is a complex inner experience. It calls on self-awareness, the ability to distinguish between your own feelings and those of others, the skill to take another’s perspective, the ability to recognize emotions in others as well as oneself, and the know-how to regulate those feelings.

Overly empathic people may even lose the ability to know what they want or need. They may have a diminished ability to make decisions in their own best interest, experience physical and psychological exhaustion from deflecting their own feelings, and may lack internal resources to give their best to key people in their life. What’s more, unending empathy creates vulnerability to gaslighting, in which another person negates your own reality to assert his or hers. For example, when you express your dismay to your friend about being excluded from her last few get-togethers, and she replies, “Oh, you’re just being too sensitive.”

Those who regularly prioritize the feelings of others above their own needs often experience generalized anxiety or low-level depression. They may describe a feeling of emptiness or alienation, or dwell incessantly on situations from the perspective of another. But what causes us to fall into an empathy trap—and how can we escape? Here are some ideas.

The roots of empathy

Babies come into the world prepared to be empathic. Very young infants cry in response to the distress of others, and as soon as they can control their bodies, they respond to those in need, to comfort or offer a Band-Aid. Kids vary in the degree to which they are empathic; there seems to be a genetic component and a hormonal basis to empathy. While progesterone boosts empathy, testosterone does not. But there are no clear gender differences in empathic ability early in life.

Much as the capacity for empathy is built into the nervous system, it is also learned, notably from warm and loving parents reflecting feelings back to their children. Almost all parents treasure the moment when a child spontaneously offers a favorite toy to relieve sadness. Ironically, though, many parents stop “seeing” their children’s kindnesses around age two and a half, and empathic behaviors plateau as parents start to reward more cognitive, achievement-oriented behaviors.

Later, parents may find themselves encouraging empathy again, to shape behavior or nurture a child’s own empathy. Think of the adult telling a teenage son, “I understand how important that event is to you—you desperately want to go—and I know that you feel really stifled by our decision.”

But sometimes children are urged to see things through a parent’s or sibling’s eyes; for example, setting aside their own interests to visit a sick relative. Many children are regularly called on to disregard their own feelings in order to “be there for others.” It may later be difficult for them to develop a balanced sense of empathy.

It is a part of the human experience to put someone else’s feelings before your own once in a while, but not consistently. In successful adult relationships, the flow of empathy is reciprocal: Partners share power equally and move back and forth between giving and receiving. When one partner does more of the giving, however, resentment is likely to build.

Gender socialization can contribute to empathic imbalance. Men who have been encouraged to “stand up” to conflict may become overly dominant or, conversely, withdraw in the face of someone’s strong feelings, not knowing how to respond without taking over or giving in. Many women are brought up to believe that empathy, in and of itself, is always appropriate, and it becomes their default mode of responding to others. The high regard in which empathic people are held obscures the fact that they may be neglecting their own feelings.

Situations of unequal power can also create imbalance between partners in giving or receiving empathy. Consider an extreme condition, Stockholm syndrome, in which hostages come to express loyalty and empathy toward their captors. Upon rescue, a newly freed person expresses understanding for the captors’ actions, sometimes even the desire to remain in touch with or to serve them. Battered women and abused children often form similar bonds with their abusers.

Sadly, in relationships marked by unequal power, those in the low-power position are more likely to defer to the needs of those in the high-power position. Doing so helps them hold on to the attachment—at the cost of becoming the architects of their own disenfranchisement.

Some situations, like caregiving, call for concentration on someone else’s needs. They can strain anyone’s empathic capacity. It’s important for all caregivers to find support from people who can offer the same kind of support for them.

From trapped to balanced

How do you know if you are at risk of being trapped by empathy? A yes answer to any of the following questions should raise a red flag.

Do you spend more time thinking about your partner’s feelings than about your own?

Do you focus your attention on what the other person is saying during an argument, to the exclusion of what you want to say?

Do you often get so caught up in the feelings of someone you love when they are depressed or hurting that the feelings seem to become your own?

After leaving an argument, are you preoccupied with what the other person was thinking?

Do you spend more time trying to figure out why someone let you down than deciding whether his or her reasons outweighed your feelings?

Reining in overempathy requires emotional intelligence; its underlying skill is self-awareness. You need always to be prepared to explore and meet your own needs. Since you’re not used to thinking about them, you might not even be fully aware of what those needs are. Whenever your empathy is aroused, regard it as a signal to turn a spotlight on your own feelings. Pause (taking a deep breath helps) to check in with yourself: What am I feeling right now? What do I need now?

Once you know what you need, you can make a conscious decision about how much to give to another and how much to request for yourself. Of course, it helps to nurture relationships with people who are mindful of the needs of others.

Taking action on your needs calls on the skill of self-management. Once you start noticing the ways in which you become absorbed by other people’s intense feelings, especially their negative ones, you can create some distance—even insulate yourself if necessary.

To help manage the mixed feelings that a surge of empathy may create, you can change the way you communicate. Suppose your partner comes home irritated with his boss. You feel too depleted to listen to a rant or make him feel better. Clearly state that you cannot meet his expectations at the moment: “You know, I’d really like to talk to you about this, but not tonight. I am completely wiped out myself. Can we find time tomorrow?”

Highly empathic people are good at spotting the emotions of others—but not necessarily interpreting them correctly. They might spin an inaccurate narrative about why someone else is having a particular feeling, or they may get stuck in feelings arising from within. It can be helpful then to pause, put your interpretation on hold, and explicitly check in by observing, “Wow, that sounds really important. Tell me more of the story.”

If others question why you are acting differently, talk openly about the changes. “Sometimes I get so caught up in your feelings, I forget about my own. I’m trying to get better at balancing that.” Don’t worry about hurting someone else’s feelings. If the person has empathy for you, the conversation can lead to a closer connection.

One way to ensure you are taking care of someone you love while keeping track of your own feelings is to convert excess empathy to compassion. When a friend is distraught, instead of assuming the feeling of distress yourself, take a breath and a step back and say, “That sounds so awful. Is there something I can do for you?”

Emotional intelligence always requires being empathic with yourself. And that paradoxically allows you to be even more present for those you love. Take a cue from a temple, Sanjūsangen-dō, in Kyoto. There, a thousand boddhisattvas of compassion are guarded by 28 fierce deities. The ancients knew that empathy, compassion, and loving kindness need special protections.

This article originally appeared in Psychology Today.