"But God commendeth His love toward us, in that, while we were yet sinners, Christ died for us."
If you were to read Romans chapter 3-5 you would find that God is not very impressed with the works of man, but more than that God is making it clear that you should be boasting of your faith and not in your abilities to do good. There is no slight on doing good, it's just that there is no connection between doing good and being righteous in Christ. It's not that if you do good you cannot be righteous in Christ, it's just that you cannot be righteous in Christ (whether you do good or not) unless you are trusting solely on faith in what Christ did for you.
Self-righteousness is not righteousness. If you are patting yourself on the back for being such a great Christian and looking down at others who do not live up to your standards, you've missed the entire message of the gospel. You were saved by nothing you did or didn't do or were worthy of above another. Anyway, if your focus is on the shortcomings of another, it is not on Christ.
When you look at others through the spiritual eyes of the indwelling Holy Spirit you cannot help but be moved with compassion. You cannot help but to want to help them in some way. You cannot help but see beyond their abilities and circumstances. You cannot help but look beyond their shortcomings and their indiscretions, their faults and even their sins. I know this sounds radical, but true Christianity is radical. True Christianity breaks away from religious forms of godliness for a better way; simple faith and trust in Jesus for yourself and for others.