Zayd bin Thabit came out from Marwan's presence at midday. I said to myself, "He must have summoned him at this hour only to ask about something." So I asked him, and he replied, "He asked us about things we heard from the Messenger of Allah ﷺ. I heard the Messenger of Allah ﷺ say, 'Whoever makes this world his chief concern, Allah will scatter his affairs, place poverty before his eyes, and nothing of this world will come to him except what has already been decreed for him. But whoever makes the Hereafter his intention, Allah will gather his affairs for him, place contentment in his heart, and the world will come to him in spite of itself.'"
حدثنا محمد بن بشار حدثنا محمد بن جعفر حدثنا شعبة عن عمر بن سليمان قال سمعت
خرج زيد بن ثابت من عند مروان بنصف النهار قلت ما بعث إليه هذه الساعة إلا لشيء سأل عنه فسألته فقال سألنا عن أشياء سمعناها من رسول الله ﷺ سمعت رسول الله ﷺ يقول من كانت الدنيا همه فرق الله عليه أمره وجعل فقره بين عينيه ولم يأته من الدنيا إلا ما كتب له ومن كانت الآخرة نيته جمع الله له أمره وجعل غناه في قلبه وأتته الدنيا وهي راغمة
Its isnad is sahih. Ahmad narrated it in 5/183 from the hadith of Shubah, in full, and Busiri graded it sahih. It has multiple routes, including with Tirmidhi, hadith 2656, from the hadith of Shubah, and he said it is hasan, and Ibn Hibban graded it sahih, hadith 72.