The quality of your relationships, and not the quantity of them, is what matters for you in terms of your emotional resilience. It is better to have a few high quality relationships than many lower quality ones. One of the attributes that differentiates people with higher quality relationships from people with lower quality relationships is their ability to be compassionate and empathetic.
To be compassionate means to be aware of and sympathetic to the suffering of others. To be empathetic means to be able to notice the subtle verbal and non-verbal signals people give off that let you know what they need or want. People who do not have the ability to recognize these subtle cues are at a great social disadvantage in terms of the way they communicate with others. On the other hand, people who are empathetic receive both physical and emotional benefits from their sensitivity. Compassionate, empathetic people are able to really listen to and understand the experiences that other people describe. Their willingness to put their own concerns away for a while and to really witness and experience others' experiences is universally appreciated as a genuine and precious gift which decreases loneliness, bonds people together (creating stronger, deeper relationships), and enhances self-esteem and self-worth for both relationship partners.
Compassion and empathy are skills that can be cultivated. You can grow in your ability to be compassionate and empathetic by practicing being other-focused (rather than self-focused), and by practicing altruism.
When you're in a relationship, there are two things you can focus your attention towards: yourself, or your partner. Being empathic and compassionate requires that you focus your attention on your partner's experience, but this is a fairly difficult thing for many people to do. It's not so much that most people are selfish or self-centered (although many are); it's more that it is just natural to be more in touch with your own needs than the needs of others. It's also the case that when you are not feeling good, you are naturally inclined to self-focus and brood on your own hurts.
The problem of self-focus is particularly pronounced when people are depressed. Depressed people often turn away from friends and love ones, thereby depriving themselves of the social support that could otherwise help to alleviate some of their pain. Because depressed individuals focus mostly on themselves and the pain they are feeling, it is easy to see how they can become pessimistic about the future.
In order to practice empathy and compassion, make the effort to put your own cares and worries aside for a while when with your relationship partner. Tell yourself, "It's okay for me to not think about myself for a while. All my worries, fears and feelings will still be here when I get back to them", and then take the time to really listen to what your partner has to say. Listen actively. Don't be thinking about what you want to say next while your partner is talking. Instead, really actively pay attention to what they have to say.
More than just listening to what your partner says with words, pay attention to how he or she carries him or herself and what he or she does. Look for disconnections between what he or she says and what he or she does. If your partner says, “I'm fine” but look like she is in great pain while saying it, you'll know she is probably not being completely open with you. If you notice this, you'll have discovered an opportunity to ask her how she is really feeling.
Practicing altruism means being willing to be generous. It means to do things to benefit others without too much thought for how those things will benefit you. There are many ways to practice being altruistic. Volunteering your time at a local community food kitchen, fostering a child (or a dog or cat), calling 911 when encountering a serious accident, or simply being there for a friend in need are all examples.
It sometimes seems on the surface that being altruistic means that you are losing something valuable and not getting anything of value in return. This is not necessarily the case most of the time, however. By giving of yourself generously, you often reap multiple benefits. First, people recognize an altruistic gesture, and understand its genuineness; they tend to be loyal to people who are willing to be generous and to act generously back to such people. Second, being generous exposes you to new relationships that may come to be very important to you. For instance, a person who is willing to become a foster parent, may end up an adoptive parent. Third, knowing that you are capable of acting generously and altruistically has a powerful positive effect on your self-esteem. When you act with compassion toward others you may even experience a “helpers high”. Throughout your life, your resilience and connection to other people become enhanced whenever you act to help other people in need.