気の持ちよう
Meanings
1
one's frame of mind; how one looks at things
A set phrase meaning that one's attitude or mindset determines how a situation is perceived or experienced.
Even the same event can make you happy or unhappy depending on your frame of mind.
How you take failure is a matter of your mindset.