Allah, the Almighty, created His slaves so that they may worship and remember Him, and He provided sustenance for them so that they may be grateful to Him. Nevertheless, many have worshipped other than Him and the masses are thankful not to Him, but to others, because the characteristic of ingratitude is widespread among human beings. So do not be dismayed when you find that others forget your favors or disregard your kind acts. Some people might even despise you and make you an enemy for no other reason than that you have shown them kindness.
And they could not find any cause to hear a grudge, except that Allah and His Messenger had enriched them of His Bounty. (Qur’an 9:74)
From among the ever-repeating pages of history is a story of a father and his son: the former raised him, fed him, clothed him and taught him; he would stay up nights so that his son could sleep, stay hungry so that his son could eat, and he would toil so that his son could feel comfort. And when the son became older and stronger, he rewarded his father with disobedience, disrespect, and contempt.
So be at peace if you are requited with ungratefulness for the good you have done. Rejoice in your knowledge that you will be rewarded from the One Who has unlimited treasures at His disposal.
This is not to say that you should refrain from performing acts of kindness towards others: the point is that you should be mentally prepared for ingratitude.
Perform acts of charity seeking Allah’s pleasure, because with this attitude you will assuredly be successful. The ungrateful person cannot really harm you: praise Allah that that person is the transgressor and that you are the obedient servant. Also, remember that the hand that gives is better than the hand that receives.
We feed you seeking Allah’s Countenance only. We wish for no reward, nor thanks from you. (Qur’an 76: 9)
Many people are shocked at the nature of ingratitude in others, as though they had never come across this verse and others like it:
And when harm touches man, he invokes Us, lying down on his side, or sitting or standing. But when We have removed his harm from him, he passes on his way as if he had never invoked Us for a harm that touched him? (Qur’an 10: 12)
Hence do not be in a state of agitation if you give someone a pen as a gift and he uses it to satirize you, or if you give someone a walking stick to lean upon and he strikes you with it. As I pointed out earlier, most human beings are ungrateful to their Lord, so what treatment should you and I expect?