Quran And Hadees Understanding
Allah announced in the Quran that the Prophet had accomplished his mission and he was going to die to meet his Lord. So, it was not a death with the displeasure of God, but God was pleased with him when He decided to end his life. See the Suran Al Nasr: إِذَا جَاءَ نَصْرُ اللَّهِ وَالْفَتْحُ ‎﴿١﴾‏ وَرَأَيْتَ النَّاسَ يَدْخُلُونَ فِي دِينِ اللَّهِ أَفْوَاجًا ‎﴿٢﴾‏ فَسَبِّحْ بِحَمْدِ رَبِّكَ وَاسْتَغْفِرْهُ ۚ إِنَّهُ كَانَ تَوَّابًا ‎﴿٣﴾‏