Decent death is bestowed on those who are always ready to die.
It is a known well that Farid-ud-Din ‘Attar (may Allah have mercy on him) was in the business of perfumery. One day early in the morning as he opened his shop, a beggar asked him for alms. He told the beggar that he had not made any money yet. The begger said, ‘You are too engrossed in wordly affairs. How would you die?’ Farid-ud-Din replied, ‘The same way as you.’ On hearing this, the begger lied down and recited: لَآ إِلٰہَ إِلَّا اللّٰہُ مُحَمَّدٌ رَّسُوْلُ اللّٰہِ [la ilaha illallah Muhammadur Rasulullah—There is none worthy of worship except Allah, Muhammad is the Messenger of Allah] and passed away there and then.
This incident deeply moved Farid-ud-Din. He immediately gave away all in his shop [to the needy] and spent the rest of his life in the remembrance of Allah.
(Malfuzat, Vol. 8, p. 51)