السلام عليكم ورحمة الله وبركاته
بسم الله الرحمن الرحيم
الحمد لله، والصلاة والسلام على رسول الله، وبعد
قال الله تبارك وتعالى:
وَٱلشُّعَرَآءُ يَتَّبِعُهُمُ ٱلۡغَاوٗنَ أَلَمۡ تَرَ أَنَّهُمۡ فِى ڪُلِّ وَادٍ يَّهِيمُونَ وَأَنَّہُمۡ يَقُولُونَ مَا لَا يَفۡعَلُونَ إِلَّا ٱلَّذِينَ ءَامَنُواْ وَعَمِلُواْ ٱلصَّـٰلِحَـٰتِ وَذَكَرُواْ ٱللَّهَ كَثِيرًا وَّٱنتَصَرُواْ مِنۢ بَعۡدِ مَا ظُلِمُواْۗ وَسَيَعۡلَمُ ٱلَّذِينَ ظَلَمُوٓاْ أَىَّ مُنقَلَبٍ يَّنقَلِبُونَ
(الشعراء: ٢٢٤-٢٢٧)
{Allah Almighty says: And as for the poets—the deviators follow them. Do you not see how they ramble in every style? And how they say what they do not do? َّExcept for those who believe, and do good deeds, and remember Allah frequently, and defend themselves after they are wronged. As for those who do wrong, they will know by what overturning they will be overturned. (26:224-7)}
Believers are generally described by the Prophet (SAW) as intelligent and astute. As such they are always vigilant and accountable. They approach each Salah/Prayer for example as their last, in accordance with the Hadith {صلوا صلاة مودّع}. Their attitude when meeting someone or doing something is that of one bidding farewell, while still planning - even long term - for this life.
There is a saying attributed to the Companion Abdullah ibn Amr ibn al-Aas (RAA), and perhaps he heard it from the Messenger of Allah (SAW), as follows:
اعمل لدنياك كأنك تعيش أبدا واعمل لآخرتك كأنك تموت غداً
{Strive in this world as if you will live forever, and strive for the hereafter as if you will die tomorrow}
We are thus as Muslims required to consistently ponder on our journey to Allah (SWT) and to plan accordingly. Some of the best reflections of this journey we find in poetry. As human beings we have always had an affinity to rhythm and rhyme, and in particular when it accompanies meanings that are profound and sublime.
There is a special enjoyment and inspiration to be derived from poetry, and indeed if it is imbibed with wisdom and positive admonishment then we are, and should be, especially attracted to it. The Messenger of Allah (SAW) said:
الحكمة ضالّة المؤمن، أنّى وجدها فهو أحقّ بها
{Wisdom is the lost property of the believer, wherever he/she finds it, they are most deserving of it.}
Allah (SWT) in the Quranic ayaat quoted at the start (above) tells us to be very selective of those whom we listen to and take guidance from. They must possess the following characteristics:
They must have faith and believe in Allah (SWT), His Messenger (SAW), the Hereafter, etc.
They must be righteous and have moral restrictions in what they say (and do)
They must remember Allah (SWT) in their lives and their literary works
They must produce good, “clean” works, support the truth, and fight injustice and oppression.
Some of the best Islamic poetry in general and on death in particular is by the early Abbasid poet Abu al-‘Ataahiyah (d. 212/828). His unique style and innovative themes and poetic techniques revolutionized, in many ways, classical Arabic poetry. He himself was a poet of ascetics and one of the earliest Arab philosophical poets. He was unconcerned about the artificial and mundane, rather his poetry focused on noble themes and on ethics and morality.
There is a well known account that Abu al-‘Ataahiyah had a few verses of his own poetry engraved and embellished on the ceiling above his bed. These were to remind him of his mortality every time he laid down to rest. They go as follows:

He also composed these verses:

It is said that one night a man who was restless got up from his bed. He could not sleep and started thinking about the first night in the grave, and then recited these verses of poetry:

Maalik ibn Dinaar (d. 130/748) said:

In conclusion, we ask Allah, the Almighty and the Supreme, to give us an easy death, and in the Hereafter the loftiest place in Jannat al-Firdaws. Aameen, O Lord of the Universe. Praise be unto You. And peace and blessings upon our leader and guide Prophet Muhammad (SAW).
NOTE: All the above translations of the poetry are my own and as such I take full responsibility for them. If they are correct then I ask Allah that they be of benefit. If any part is incorrect or lacking, then I ask Allah to forgive me and I ask you to please help me render them more accurately.