Faith and doing Righteous Deeds equals Salvation in all Times
After Allah described the condition - and punishment - of those who defy His commands, fall into His prohibitions and transgress set limits by committing prohibited acts, He stated that the earlier nations who were righteous and obedient received the rewards for their good deeds. This shall be the case, until the Day of Judgment. Therefore, whoever follows the unlettered Messenger and Prophet shall acquire eternal happiness and shall neither fear from what will happen in the future nor become sad for what has been lost in the past. Similarly, Allah said,
[أَلا إِنَّ أَوْلِيَآءَ اللَّهِ لاَ خَوْفٌ عَلَيْهِمْ وَلاَ هُمْ يَحْزَنُونَ ]
(No doubt! Verily, the Awliya' of Allah, no fear shall come upon them nor shall they grieve) (10:62).
The angels will proclaim to the dying believers, as mentioned,
[إِنَّ الَّذِينَ قَالُواْ رَبُّنَا اللَّهُ ثُمَّ اسْتَقَـمُواْ تَتَنَزَّلُ عَلَيْهِمُ الْمَلَـئِكَةُ أَلاَّ تَخَافُواْ وَلاَ تَحْزَنُواْ وَأَبْشِرُواْ بِالْجَنَّةِ الَّتِى كُنتُمْ تُوعَدُونَ ]
(Verily, those who say: "Our Lord is Allah (alone),'' and then they stand firm, on them the angels will descend (at the time of their death) (saying): "Fear not, nor grieve! But receive the glad tidings of Paradise which you have been promised!''). (41:30)