My brother and I both use that phrase... No good deed goes unpunished... when referring to a certain person we both know... unfortunately, that is the other person's personality/problem
It can become a way of life thinking though, if not kept in check. When we begin looking for only the negative, expecting it, then we actually DRAW it towards us. (It's called the "observer effect" in quantum physics, and works on even the most miniscule level of beings!)
Look for honesty, and fairness, expect it from others, and give it as best we can, that's what is in our own best interest, imo.