Paulo Coelho said this quote

They say that in the second before our death, each of us understands the real reason for our existence, and out of that moment, heaven or hell is born.