Generally speaking, one dies as one has lived. That is one of the great truths which Holy Scripture and the Fathers repeat in many different places. If you live as good Christians, you will be sure to die as good Christians, but if you live badly, you will be sure to die a bad death. The prophet Isaiah warns us that the impious man who thinks only of doing evil is in a woeful state, for he will be treated as he deserves. At death he will receive the reward for the work he had done. It is true, however, that sometimes, by a kind of miracle, one may begin badly and finish well, but that happens so rarely that, as Saint Jerome puts it, death is generally the echo of life. You think that you will return to God? No, you will perish in sin!
(from the Book “The Sermons of The Cure of Ars”, TAN Books 2013, Page 182)