Is there a specific supplication for protection against a sudden death?
Question

Is there a supplication that will protect you against a sudden death? What is it?
Praise be to Allah.Firstly:
Sudden death is one of the things that Allah decrees for some of His slaves, meaning that death comes to a person suddenly, without any respite or warning; rather it comes out of the blue and his soul is taken smoothly, without suffering the agonies of death and its precursors.
This is one of the ways of death that have existed since ancient times and has increased in modern times, because of the traffic accidents that are well known today, and the launching of war against peoples and individuals with efficient modern killing machines.
In some reports and hadiths it says that the spread of sudden death is one of the signs of the Hour. These reports were classed as hasan by al-Hafiz as-Sakhawi in al-Maqasid al-Hasanah (p. 506). He said: It has many chains of narration which strengthen one another. It was also classed as hasan by al-Albani in as-Silsilah as-Sahihah (5/370); you can read it in the book Ithaf al-Jama‘ah bima jaa’a fi’l-Fitan wa’l-Malahim wa Ashrat as-Sa‘ah (2/236) by Shaykh Hammud at-Tuwaijri.
Secondly:
Moreover, a sudden death may be a good thing, or it may be a bad thing, depending on the condition of the one who dies and his standing before Allah, may He be glorified and exalted:
1. If the one who dies is one who is righteous and good, with a track record of good deeds and righteous deeds to his credit, which gives hope that he will have a light before him on the Day of Resurrection, then in his case all kinds of death are good, whether it is a sudden death or it comes after suffering the agonies of death. A sudden death is a mercy, kindness and pardon from the Lord of mankind, so he does not experience the pain of dying and the anguish of its agonies, and he does not suffer much sickness. If he experiences that suffering, and his death is not sudden, that will be an expiation for his bad deeds, and will raise him in status before Allah. That is a confirmation of what the Prophet (blessings and peace of Allah be upon him) said about the affair of the believer being entirely good, and that the death of the believer is a relief for him from the toil and misery of this world, as it takes him to the bliss of the hereafter.
2. But if the one who dies was one of those who fall short in their duties to Allah, or he was an evildoer, oppresser or disbeliever, then in his case a sudden death is a kind of punishment and divine wrath, because death was hastened for him before he could repent, and he was not given any respite so that he could make up for his past negligence and shortcomings. Rather he was snatched by way of punishment and as a result of divine wrath, as the Prophet (blessings and peace of Allah be upon him) described it when he said: “Sudden death is a seizing by (divine) wrath.” Narrated by Abu Dawud (3110).
Because it is difficult to judge whether one is righteous or is falling short, and people vary in that regard, and some people may go through experiences that make them more pious and increase their fear of Allah, or make them more steadfast and more certain, we find in the reports from the early generations that they had different views regarding sudden death. In the case of one whose fear of Allah is uppermost, and he thinks that he is falling short in his religious duties, he will seek refuge with Allah from sudden death and will hope that Allah will expiate his sins by causing him to go through the agonies of death, whereas in the case of one whose hope of Allah’s vast mercy is uppermost, he will see sudden death as a relief and mercy, and pardon from Allah, may He be glorified and exalted.
So when we read what the early generations said about sudden death, it will appear to be contradictory, but in reality there is no contradiction; rather it is two different, valid views.
It was narrated that ‘Abdullah ibn Mas‘ud and ‘A’ishah (may Allah be pleased with them both) said:
It is punishment for the evildoer and relief for the believer – meaning sudden death."(Musannaf Ibn Abi Shaybah (3/370); as-Sunan al-Kubra (3/379).
It was narrated that Tamim ibn Salamah said: A man among us died suddenly and one of the companions of the Prophet (blessings and peace of Allah be upon him} said that it was a sign of divine wrath. I mentioned that to Ibrahim – and we rarely asked Ibrahim a question but we found an answer with him – and he said: They disliked a sudden death that appeared to be a sign of divine wrath."(Musannaf Ibn Abi Shaybah  3/370).
Thirdly:
With regard to the marfu‘ hadiths [those that are attributed directly to the Prophet (blessings and peace of Allah be upon him)], none of them are sahih except the hadith quoted above, “Sudden death is a seizing by (divine) wrath,” even though some scholars had some reservations about it. Al-Hafiz Ibn Hajar (may Allah have mercy on him) suggested that it was narrated via both marfu‘ and mawquf isnads, and he said that Imam al-Bukhari (may Allah have mercy on him) indicated that there were some reservations about its  isnad. See: Fath al-Bari by al-Hafiz Ibn Hajar (3/254).
As for other hadiths which speak of sudden death as being something praiseworthy or blameworthy, and suggest that the Prophet (blessings and peace of Allah be upon him) used to seek refuge with Allah from it, none of them are sahih.
Hence al-Fayruzabadi (may Allah have mercy on him) said:
Nothing is proven concerning that."(Safar as-Sa‘adah  p. 353).      
Fourthly:
There is no specific supplication for protection against a sudden death that has been narrated soundly from the Prophet (blessings and peace of Allah be upon him). What is widely disseminated in chat rooms about a supplication for which the reward of 360 Hajjs will be recorded for the one who says it, and it will protect him from a sudden death, and so on, is false and fabricated, and has no basis in the books of Sunnah. We have previously explained that in the answer to question no. 126635 .
It is best for a person to recite the supplication that the Prophet (blessings and peace of Allah be upon him) used to recite:
It was narrated that ‘Abdullah ibn ‘Umar (may Allah be pleased with him) said:
One of the supplications of the Messenger of Allah (blessings and peace of Allah be upon him) was: “Allahumma inni a‘udhu bika min zawali ni‘matika wa tahawwuli ‘aafiyatika wa fuja’ati niqmatika wa jami‘i sakhatika (O Allah, I seek refuge with You from the withdrawing of Your blessing, and the loss of good health, the sudden onset of Your wrath, and anything that may lead to Your displeasure).”
Narrated by Muslim (2739).
And Allah knows best.