I think each person has in them an impulse toward the light and an impulse toward the dark. I don't mean good and evil necessarily, but I suppose that's part of it. By "light" I mean "clear" and by "dark" I mean "confused".
If you're clear about who you really are—what you value, what truly has meaning to you, and what your life is about—then that very act of self-consciousness will propel you toward those things. That part of yourself will become stronger, and you'll begin to reject the things that send you into darkness and confusion or whatever else is against your intrinsic nature.
And when bad things do happen, they'll hurt and inconvenience you, but you won't be capsized by them, because your life has purpose and direction. You know you're on the road toward something much larger and more profound, so a temporary setback doesn't have as much meaning.
It's all kind of Spinozist, I guess. I've often thought Spinoza was right about a great many things.