In Buddhism there is the concept of two arrows. The first arrow being the painful one that is done to us and is out of our control. The second arrow is what we do to ourselves and the one that is the cause of suffering in our lives.
To put it simply pain is inevitable, but suffering is optional. How so?