https://aleteia.org/2018/04/14/a-technique-from-the-desert-fathers-to-control-our-negative-thoughts/
What is “Guarding the Heart”?
Guarding the heart, in Greek nepsis (vigilance), is being attentive to everything that happens in our heart. It is a spiritual method which aims to free man of bad or passionate thoughts. It invites us to observe the thoughts which penetrate our soul, and to discern between the good and the bad. Evagrius said: “Take care of yourself, be the gatekeeper to your heart and don’t let any thought enter without questioning it.” As Xerri points out: “The elders noticed that holy thoughts led to a peaceful state, the others to a troubled state.”
The indispensable means of guarding the heart is paying close attention to thoughts and discerning between those which are good and healing, and those which are a source of distraction or obsession. The aim is to gain freedom, and to reach indifference, the ability to not be dominated by our thoughts.
A little prayer to help guard your heart
In their bid to find Hesychasm, the Desert Fathers would often empty their minds and recite the very simple Prayer of the Heart, or Jesus Prayer. So if you want a little help from our Orthodox forefathers in being able to control the thoughts that cross our minds, try and find time in the morning to say this prayer before the demands of the day really kick in: “Lord Jesus Christ, Son of God, have mercy on me, a sinner.” (Although “a sinner” was added over the years.)