Almighty Allah has created His servants so that they may worship and remember Him, and He has provided sustenance for them so that they may be grateful to Him. Nevertheless, many have worshipped other than Him, and the majority of people are thankful not to Him, but to others. Indeed, 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.
Almighty Allah says:
(And they could not find any cause to bear a grudge, except that Allah and His Messenger had enriched them of His Bounty.] (ِAt-Tawbah 9:74)
From among the ever-repeating pages of history is a story of a father and his son:
The father raised his son, 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 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 toward others; the point is that you should be mentally prepared for ingratitude.
Perform acts of charity seeking solely 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.
Allah, the Most–High, says:
[We feed you seeking Allah's Countenance only. We wish for neither reward nor thanks from you.] (Al-Insan 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, such as:
[And when harm touches a person, he invokes Us [Allah], 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.] (Yunus 10:12)
Hence, do not be in a state of agitation if you give someone a pen as a gift and he or she uses it to satirize you, or if you give someone a walking stick to lean upon and he strikes you with it. As pointed out earlier, most human beings are ungrateful to their Lord, so what kind of treatment should you expect?