Whoever will consider the whole commerce of human life will see, that a great part, perhaps the greatest part, of the intercourse amongst mankind, cannot be reduced to fixed determinate rules. Yet in these cases, there is a right and a wrong: a merciful, a liberal, a kind and compassionate behaviour, which surely is our duty; and an unmerciful contracted spirit, a hard and oppressive course of behaviour, which is most certainly immoral and vicious. But who can define precisely wherein that contracted spirit and hard usage of others consist, as murder and theft may be defined? There is not a word in our language which expresses more detestable wickedness than oppression: yet the nature of this vice cannot be so exactly stated, nor the bounds of it so, determinately marked, as that we shall be able to say, in all instances, where rigid right and justice ends, and oppression begins. In these cases, there is great latitude left for everyone to determine for, and consequently to deceive himself. It is chiefly in these cases, that self. deceit comes in; as everyone must see, that there is much larger scope for it here, than in express, single, determinate acts of wickedness. However it comes in with respect to the circumstances attending the most gross and determinate acts of wickedness. Of this, the story of David, now before us, affords the most astonishing instance. It is really prodigious, to see a man, before so remarkable for virtue and piety, going on deliberately from adultery to murder, with the same cool contrivance, and, from what appears, with as little disturbance, as a man would endeavor to prevent the ill consequences of a mistake he had made in any common matter. That total insensibility of mind, with respect to those horrid crimes, after the commission of them, manifestly shows that he did some way or other delude himself: and this could not be with respect to the crimes themselves, they were so manifestly of the grossest kind. What the particular circumstances were, with which he extenuated them, and quieted and deceived himself, is not related.
Butler, On Self-Deceit, Fifteen Sermons. The story in question, of course, is David and Bathsheba, 2 Sam. 11-12 (with a special focus on Nathan's confrontation with David in chapter 12), one of the most interesting stories of David's reign.