In his book The Miracle of Mindfulness, Thich Nhat Hahn says the following:

While practicing mindfulness, don’t be dominated by the distinction between good and evil, thus creating a battle within oneself.

Whenever a wholesome thought arises, acknowledge it: “A wholesome thought has just arisen.” If an unwholesome thought arises, acknowledge it as well: “An unwholesome thought has just arisen.” Don’t dwell on it or try to get rid of it. To acknowledge it is enough. If they are still there, acknowledge they are still there. If they have gone, acknowledge they have gone. That way the practitioner is able to hold of his mind and to obtain the mindfulness of the mind.

This is a practice that you can begin right now. By objectively observing your mind, you can learn to detatch yourself from your inner monologue. When you get caught up in a stream of unconscious negative or fearful thoughts, the result will be anxiety, sadness, or a panic attack. Instead, direct your attention to being an outside observer.

When you labale your thoughts as “good” or “bad” or “nice” or “scary,” you’re not objectively observing and you’re creating an emotional response to your thought processes. A major part of overcoming anxiety and depression is learning not to attribute too much emotional meaning to your thoughts.

Again, the practice of mindfulness requires practice, but do not give up. The rewards are well worth your effort.