I’ve taught myself that my first reaction to anything “bad” is to say:
“Good that happened.”
Lost money on a trade? Good.
Lost a game of Padel? Good.
Portfolio down? Good.
Missed a flight? Good.
Everything happens for a good reason, you just don’t know it yet.