According to the great existential psychologist Viktor Frankl, the capacity to be psychologically resilient is directly related to our willingness to take responsibility for our actions.
Exercises for resilience:
https://www.cnbc.com/2021/08/31/do-these-exercises-every-day-to-build-resilience-and-mental-strength-says-neuroscientist.html
Viktor Frankl:
https://www.pursuit-of-happiness.org/history-of-happiness/viktor-frankl/