Your last moments will reflect your way of life. If you lived your life constantly sinning without returning to your Lord in repentance, how can you expect to miraculously have a good ending? All the best things are achieved by working hard.
See the bad inside yourself, and see the good inside others. -Imam Ali (a.s)