Of the 4 Brahmavihāras ('Divine Abodes'), Loving Kindness ('Mettā') is by far the most commonly taught meditation. But we should not neglect Compassion ('Karunā'). Compassion is often the most skilful approach when we encounter horrendous suffering, pain that may appear too overwhelming to respond with loving kindness. Compassion is simply the wish, the wholehearted intention for other beings to be freed from whatever suffering they may experience.
To develop compassion we start by cultivating empathy, the ability to feel sympathetically what other beings experience, in this case in particular what forms of suffering they experience. However, compassion does not end with empathy, because else it could lead us into sadness or even depression, when we fully open up to the manyfold hardships other beings undergo. Once we are able to percieve or imagine the pain others experience, then we focus on the wish that they may be freed from that very pain. This intention is the essence of compassion, it is an utterly wholesome and uplifting intention, which doesn't pull us down, but induces an uplifting, positive mindstate even in the face of abysmal suffering that we perhaps may occasionally witness.
The miracle of compassion is that it can turn around the unwholesome responses to suffering, like ignoring, denying, or else feelings of pity or even shock, disgust & depression, into an utterly beneficial emotion. A beneficial emotion that is so wholesome and positive that it can even lead us into deep samādhi.