Sayyiduna Sahl bin Sa'd al-Sa'idi (may Allah be pleased with him) narrates: Sayyiduna Jibril (peace be upon him) came to the Prophet (peace and blessings be upon him) and said: "O Sayyiduna Muhammad (peace and blessings be upon him)! Live as long as you wish, but you are to die; do whatever deeds you wish, you will be recompensed for them; love whomever you wish, you will have to part from him. And know that the honour of the believer lies in his voluntary prayer at night, and his dignity lies in his independence from people."
At-Tabarani recorded it in al-Mu'jam al-Awsat, and its chain is hasan (good).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الزهد / 17644