Learning To Respond Without Reacting Is The Work Of A Lifetime
But you can do it. It is within your reach to be unperturbed by life's shocks and upsets.
There are a bunch of ways you can learn to do this including stoic philosophy, mindfulness and Buddhist meditation techniques.
Either option will teach you the art of detachment.