Be careful that you do not do your righteous works in front of people, so that they will notice.
If you do, you have no reward from your Father who is in heaven. Matthew 6:1
When you do something good for someone, you want to tell others, don't you? I know I do! That good deed made me feel good about myself and I want to bask in that feeling by sharing it with others. I don't consider that bragging or making myself appear to be "holier than thou". It's just a "hey I did this and it melted my heart when I saw the difference it made". That kind of sharing is not what this passage is about.
Jesus was talking about the motive behind the good work. If you are making sure others know about the wonderful thing you just did because you want to appear better in their eyes, you have the wrong motivation. And, if you do that good work just to make yourself look better, well, that's the wrong motive, too.
Jesus wants us to do good works so we become more like Him. Every good thing Jesus has done has been out of love. He wants us to act out of love, too. Love for God and love for others. When love for others outweighs love for ourselves, we make God truly happy.
I think it's good to have warm and fuzzy feelings when we show God's love to others. Those feelings make it easier to stay motivated. And talking about those feelings keeps them alive. It's the motivation behind those feelings that is the important thing. We should do good works to show God's love, not elevate ourselves.
More of Him. Less of me.