Khalid bin Abi Imran (may Allah have mercy on him) said: Once the Prophet (peace and blessings be upon him) was supplicating against the disbelievers of Mudar. Suddenly Jibril (peace be upon him) descended. He gestured to the Messenger of Allah (peace and blessings be upon him) and said: "Be silent!" So the Messenger of Allah (peace and blessings be upon him) fell silent. Then he said: "O Muhammad (peace and blessings be upon him), Allah Almighty did not send you as one who reviles or curses; rather He sent you as a mercy, not as a punishment. 'Not for you is anything of the matter, whether He accepts their repentance or punishes them, for they are wrongdoers.' [Surah Al Imran: 128] Nothing of the matter is in your hands; if Allah wills He may accept their repentance or punish them, for they are wrongdoers." Then Jibril (peace be upon him) taught the Messenger of Allah (peace and blessings be upon him) this qunut: 'Allahumma inna nasta'inuka wa nastaghfiruka wa nu'minu bika wa nakhda'u laka wa nakhla'u wa natruku man yakfuruk; Allahumma iyyaka na'budu wa laka nusalli wa nasjudu wa ilayka nas'a wa nahfid; narju rahmataka wa nakhsha 'adhabak; inna 'adhabaka bil-kafirina mulhiq' "O Allah, we seek Your help, we ask Your forgiveness and we believe in You. To You alone we humble and submit ourselves, and we cut off every tie with whoever denies You and abandon him. O Allah, You alone we worship, for You alone we pray and to You alone we prostrate; towards You alone we hasten, and we are ready for Your every command. We hope for Your mercy and we fear Your severe punishment. Indeed, Your punishment is to overtake the disbelievers."
This is mursal (with a broken chain), and it has been narrated from Umar bin al-Khattab (may Allah be pleased with him) authentically with a connected chain.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3142