I have found that the greatest degree of inner tranquility comes from the development of love and compassion. The more we care for the happiness of others, the greater is our own sense of well-being. Cultivating a close, warmhearted feeling for others automatically puts the mind at ease.
Naturally, most of us would like to die a peaceful death, but it is clear that we cannot hope to die peacefully if our lives have been full of violence, or if our minds have mostly been agitated by emotions like anger, attachment, or fear. So if we wish to die well, we must learn how to live well: Hoping for a peaceful death, we must cultivate peace in our mind, and in our way of life.