Abu Hurayrah narrates that the Messenger of Allah (ﷺ) said:
الطَّاعِمُ الشَّاكِرُ بِمَنْزِلَةِ الصَّائِمِ الصَّابِرِ
“The one who eats and is grateful is like the status of the one who fasts and is patient.”
[al-Tirmidhi #2486, Hasan. And Ibn Khuzaimah declared it sahih in his collection (#1898), as did Ibn Hibban (#952) and al-Haakim (4/136). And al-Dhahabi agreed with that. It is also recorded in Ibn Maajah #1764, hasan. And Al-Albaani declared it sahih in al-Silsilah al-Saheehah 2/258]
Imam al-Mubarakfoori wrote in explanation of this hadith:
قوله : ( الطاعم الشاكر ) أي لله تعالى بمنزلة الصائم الصابر لأن الطعم فعل والصوم كف ، فالطاعم بطعمه يأتي ربه بالشكر والصائم بكفه عن الطعم يأتيه بالصبر . قال القاري : أقل شكره أن يسمي إذا أكل ويحمد إذا فرغ وأقل صبره أن يحبس نفسه عن مفسدات الصوم . قال المظهر : هذا تشبيه في أصل استحقاق كل واحد منهما الأجر لا في المقدار ، وهذا كما يقال زيد كعمرو ومعناه زيد يشبه عمرا في بعض الخصال ولا يلزم المماثلة في جميعها فلا يلزم المماثلة في الأجر أيضا ، انتهى .
His statement, “The one who eats and is grateful” – meaning Allah the Exalted makes his status like that of the fasting person who is patient because eating is action and and fasting is abstention. So the one who eats food comes to His Lord with gratitude and the one who fasts and abstains from food comes to Him with sabr (patience). Al-Qaari said, “his gratitude is such that he at least praises Allah [saying al-hamdulillaah] when he eats and when he finishes, and his sabr is such that he at least restrains himself from those things which invalidate the fast.” Al-Mathhar said, “This is similar in nature to the entitlement which every person has to the reward without measure [i.e. for fasting, see this hadith].” And this is like when one says, “Zaid is like ‘Amr”, and the meaning is the Zaid resembles ‘Amr in some characteristics and is nor necessarily similar in all of them, so these two are not necessarily equivalent in reward either.