When Dr. F. B. Meyer was young, he was often negative and irritable. One day an elderly saint told him how he had gained victory over irritability in his own life. "When irritation rises in my heart, I look up and say, 'Your sweetness, Lord!'" Meyer said he tried this practice and it worked for him!
The great evangelist explained the best way to counter unhelpful thoughts and attitudes, is breathing a prayer of replacement.
For falsehood -- your truth, Lord.
For unkindness -- your kindness, Lord.
For impatience -- your patience, Lord.
For selfishness -- your unselfishness, Lord.
For roughness -- your gentleness, Lord.
For discouragement -- your courage, Lord.
For resentment -- your sweetness, Lord.
The cycle of negative thought patterns can be broken by calling to heaven for positive reinforcements.