The questions are these:
(1) Can I detect which thinking is rotten and which is not?
The basic principle is this: negative thinking is rotten.
We have to exercise critical faculties and thus predict and avoid or prepare for possible threats, and observe unpleasant occurrences or facts to respond constructively. Almost all thinking with a negative emotional charge is entirely without function, however.
(2) Can I work out what to think instead?
The focus must be on staying close to God (which means talking or listening to God or affirming aspects of God, for which see Emmet Fox, for example) or performing His work well (which means constructive analysis of the past or present, necessary planning, and attending to the task or experience at hand).
If I am idle, the former is required. If I am not idle, the latter is required. In any case, one or the other is an option.
(3) How do I go from A to B?
(a) Spot rotten thinking.
(b) Ask briefly: is there any purpose to this thinking? To answer this, consider whether I need to analyse my past conduct or plan a course of action. If so, that is the purpose. If not, there is no purpose.
(c) Even if there is a purpose: is now the time for inventory or planning, or should a time be set aside deliberately to this end? Almost all inventory and planning is non-urgent and should not therefore interrupt the flow of the day.
(d) Once I have determined the negative thinking is rotten and purposeless, I pick from one of the following as the corrective measure for my thinking:
(3) Affirm aspects of God or faith-inspiring truths from some spiritual literature.
(4) Consider a spiritual principle and how it might apply to the situation I am in.
(5) Browse through spiritual literature to find passages I can read and apply to lift my thinking to a higher plane.
(6) Actively come back to the present, insisting on awareness of everything physical outside and inside me, coming back to that every time my mind distracts me; God is found now; if I am in the now, I am in God.
(7) Concentrate on breathing, bringing my mind gently and persistently back to the breathing whenever I am distracted.
(8) Find a vigorous physical activity to engage in.
(9) Find something useful to do.
(10) Put on some talk-based radio station, preferably with edifying, interesting material; I cannot be thinking about myself and listening actively to Radio Four at the same time.
(11) Call someone who is doing worse than me and see if I can bring some light into their lives.
(12) Return to the activity I was scheduled to be engaged in before my mind pulled me away; (this is the beauty of having a plan for the day: there will always be something I am supposed to be doing, even something quiet and relaxing, but something concrete, nonetheless).
In short: if I remain in negative thinking, I am doing it to myself, because there is always an alternative.