The Chafetz Chaim wrote that if you are not able to do acts of kindness for others for altruistic reasons, and your main motivation is to win the approval of others, you should still continue to help as many people as you can. As the Sages said, "A person should study Torah and do good deeds even if he has ulterior motives. Eventually one will be motivated by more elevated intentions."