St. Thomas Aquinas on Sins of the Heart

Consequently when the reason fails in directing the internal passions, sin is said to be in the reason, as also when it fails in directing external actions. Now it fails, in two ways, in directing internal passions: first, when it commands unlawful passions; for instance, when a man deliberately provokes himself to a movement of anger, or of lust: secondly, when it fails to check the unlawful movement of a passion; for instance, when a man, having deliberately considered that a rising movement of passion is inordinate, continues, notwithstanding, to dwell [immoratur] upon it, and fails to drive it away. And in this sense the sin of morose delectation is said to be in the reason.

- Summa Theologica, I-II, 74, 6.