‘Ubaidallah b Khalid reported God’s messenger as saying, “Sudden death is an act of punishment out of anger.” Abu Dawud transmitted it.
Baihaqi in Shu'ab al-iman and Razin in his book made an addition, saying “An act of punishment out of anger for the infidel and a mercy for the believer.”