Angel Jibrail (AS) told Prophet Muhammad SAW the following incident about a man in the past who worshipped Allah Ta'ala continuously for 500 years. He was granted a shelter on top of a mountain that was surrounded by salty water. However, Allah caused a stream of sweet water to flow through the mountain for that individual. The man would drink from this water and use it to make ablution. Allah Ta'ala also raised a pomegranate tree from which the man would eat one fruit every day.
One day, this person supplicated to Allah SWT (God) that, "Oh Allah, bring my death while I am in the state of prostration." Allah accepted this dua of his. Whenever Jibrail (as) came down to the Earth, he found this man prostrating to Allah. Jibrail (as) said that on the day of Judgement, Allah will tell the angels to take this individual to Paradise through His mercy. However, this man will insist that he should enter paradise through the good deeds that he had performed.
Then, Allah will tell the angels to compare his good deeds with the blessings that were given to him in the world. It will be seen that 500 years of his worship does not even equal to the gift of eye sight that was given to him by Allah. The angels will be asked to take him towards the hell fire. Then the man will plead, "Oh Allah! Enter me into Jannah Paradise only through Your mercy." At that point, the following discussion will take place between Allah and that man.
Allah SWT: Oh my servant, who created you?
The worshipper: Oh Allah, You have created me.
Allah SWT: Were you created because of the good deeds you have done or because of My mercy?
The worshipper: Because of Your mercy.
Allah SWT: Who granted you the ability to worship for 500 years?
The worshipper: Oh the Almighty! You have granted me that ability.
Allah SWT : Who placed you on the mountain surrounded by the ocean? Who caused a stream of sweet water to flow in between the salty water? Who caused a pomegranate tree to grow for you? Who granted you death while in the state of prostration?
The worshipper: Oh the Sustainer of the Worlds! You have done all of these.
Then Allah SWT (God) will say, "All these have happened due to My mercy and you too will enter Paradise only through My Mercy."
We can never thank Allah SWT (God) for the blessings that He has given us. Let us use these blessings to recognize Allah before our death.
"Allah! There is no god but He - the Living, The Self-subsisting, Eternal. No slumber can seize Him Nor Sleep. His are all things In the heavens and on earth. Who is there can intercede In His presence except As he permitteth? He knoweth What (appeareth to His creatures As) Before or After or Behind them. Nor shall they compass Aught of his knowledge Except as He willeth. His throne doth extend Over the heavens And on earth, and He feeleth No fatigue in guarding And preserving them, For He is the Most High. The Supreme (in glory)."(Ayat Kursy The Throne Verse From Holy Quran)