Selfish Sacrifice

So I have noticed that at times my outward appearance of sacrifice is motivated by a heart of selfishness. How can this be? I have noticed that sometimes I give, sacrifice my time, serve others so that on the outside it looks like I am serving, but I do it so that people will recognize me for those sacrifices. The other day I found myself being angry that I was not receiving recognition for serving. My heart was being selfish in serving. I was focused more on myself in the midst of serving others. I was serving not for the sake of others or for the Kingdom's sake, but for my own sake! I am amazed sometimes at my capacity for sin even in the midst of serving.