Changing the destructive things you say to yourself when you experience the setbacks that life deals all of us is the central skill of optimism.
Any sufficiently advanced technology is indistinguishable from magic.