Meditation, or more accurately mind training, helps to cultivate the inner resources that give us confidence to deal with the ups and downs of life. These inner resources include inner freedom that makes us less vulnerable to ever-changing outer conditions. Here, inner freedom means being free from the influence of automatic mental processes that lead to animosity, obsession, envy, and other mental toxins that undermine our well being.
Selfishness leads to a miserable life for oneself and for others. If we become less vulnerable and more resilient, we will not feel threatened by the outside world and we will be more readily open to others.
Thus, these inner resources that help build resilience include altruism and kindness. We all have the potential to cultivate these inner resources, but it will not happen just because we want it to. To develop any skill, we need to train. Likewise, we need to train our mind to develop resilience. This is the essence of meditation.