“Character cannot be developed in ease and quiet. Only through experience of trial and suffering can the soul be strengthened, vision cleared, ambition inspired, and success achieved.”
― Helen Keller

Suffering becomes beautiful when anyone bears great calamities with cheerfulness, not through insensibility but through greatness of mind.     

Aristotle

Even in the face of hardship, suffering, pain and loss there are opportunities for goodness to emerge. In fact, as Helen Keller points out above, character and strength can only be developed in the face of difficulty. Challenge is the teacher that draws out and develops the best within us.

In adversity it is how we interpret or give meaning to what happens, the frame or narrative we put around events that matters. Then, it is how we respond to what is happening that determines what value can be created even in the direst situation.

The most natural and appropriate response in the face of suffering is compassion. Compassion is concern for the suffering of oneself or others and the desire to alleviate that suffering. It is an attitude or intention that we can choose to bring to any situation where there is pain.

Just as we can respond with compassion, we can also choose to respond with gratitude. Suffering and loss remind us not to take things for granted. As a result, in addition to grieving what we have lost, we can begin to appreciate what we have. Equally we can bring an attitude of generosity, courage, kindness or any other number of wholesome states to bear on difficult times.

Practice:

When faced with a difficult situation see if you can consciously shift the way you look at it by asking:

What might be a beneficial aspect of this situation? What potential goodness might be here?

Then shift to focusing on the best way to respond:

What might be a wise and resourceful response to this situation?

What is possible for me right now to improve this situation even in some small way?

Then see if you can exercise, and so develop, a strength or virtue like patience, equanimity, humility, compassion, justice, resilience, resolve or understanding.