If a person's explicit verbiage about someone else is benign on the surface, but has an unexpressed and somewhat nasty thinking behind it, is this considered lashon hara? Are there any guidelines or sources as to how to attenuate those unkind motives which will enhance one's attitude towards others and make one's speech more kindly?
Judaism isn't as overtly focused over negative thoughts like some other religions are. The Christians follow a Rabbi who says that someone who murders in their heart or commits adultery in their heart is guilty of the actual thing. Judaism as a whole is not willing to take this stance. Thinking about murder is definitely different than murder itself, since one causes no harm outside the self and the other ends a life. But I believe Judaism still has a concept of the place you let your mind go will eventually be the place your mind spends most of its time. If you let yourself have unchecked fleeting thoughts of adultery, you will eventually have unchecked periodic thoughts of adultery, and then possibly frequent thoughts of adultery. This is not ideal and there is value in trying to prevent your mind from regularly going to such negative places unchecked.
For me, these kind of negative thoughts occur most often when I'm driving in LA. Someone cuts me off, or does something legitimately dangerous and I might have a momentary thought about that person that is terrible. So I apologize to God, in English. Because I know that the more often you let yourself "go there" guilt free, the more likely you will keep "going there."
Another common situation is when I have negative thoughts toward how someone dresses. So I take another moment to apologize to God for judging how a person is dressing, rather than doing the right thing and judging myself for how I looked at them and my emotional response to them. The only one responsible for where my eyes go is me, not someone else.
Rav Hutner says that the foundational issur of lashon ha'ra is judging unfavourable (dan le'kaf chov).
The lashon ha'ra is an expression of the negative evaluation that you have attributed to the person whom you have judged unfavourably.
So the basic issur of lashon ha'ra is to construe someone else as having negative value.