Plenty of personal coaches, psychologists and consultants will provide you with advice and techniques for mental control, each teacher providing what works for him or her. But in Jewish circles we have a small book called the Tanya, a classic work of spiritual guidance by a great tzaddik and teacher building upon an ancient tradition—and it’s chock-full of how thoughts work and how to reach great heights by learning to control them.

Here are a few mind-hacks from the Tanya, gently rendered 21st-century friendly:

1. Thoughts are a touchscreen display for your psyche.

Think of the display on your smartphone (hey, maybe you’re looking at that right now!). By touching that display, choosing what you want to observe and manipulating the symbols, you have control over your device.

Same with your thoughts—they’re not just a window into your brain and heart. They also allow you to manipulate that brain and heart.

Your smartphone is manipulated by touch and voice. Your thoughts are manipulated by simply detaching yourself a little, observing what’s up on the display and choosing which thoughts you want to invest in.

2. Mental control is really heart control.

If I tell you I’m sad, don’t tell me I shouldn’t be sad. I am sad.

But if you offer me some happy thoughts to think, pretty soon I may not be so sad.

You can’t choose how you feel, but you can choose what you think, and what you think has the power to change how you feel.

That’s what the Zohar means when it says that the mind innately rules over the heart. Not the way a dictator rules by stern command; nature requires no commands. Rather, wherever your thoughts travel, your emotional state naturally follows close behind.

Ever been to one of those guided relaxation classes? Your mind observes “I’m breathing”—and your breathing falls into a steady rhythm. Your mind observes “my fingers are tense”—and without any order or command, your fingers release their clasp and relax.

Herbert Benson deemed it “the relaxation response.” Any part of the body that comes into direct connection with the mind becomes mindlike—calm, steady and detached.

So too, when the mind applies itself to matters that concern the heart, the childlike heart responds by growing up a little and becoming a more mindful heart.

3. Your thoughts never stop.

Stop and listen to the thoughts running through your mind. Yes, we all have them. Everyone describes them differently, and some are more aware of them than others, but they’re there, buzzing nonstop.

If you don’t hear your thoughts, try this simple, well-known hack: Stop everything you’re doing and listen to your breathing. Within a short while, as your breathing becomes more rhythmical, your thoughts will seem to become louder. Now you can start observing them.

You’ll notice that your thoughts are quite similar to your breath. You can control your breath, but when you let go of the reins, the breathing continues all on its own.

The same with your thoughts. You can choose what to think, but when you let go, your thoughts don’t stop. They never do. You may be thinking about nothing, but you’re never not thinking.

Now that’s important to know. Because the autopilot function in your brain is not the pilot of choice in anyone’s cockpit. And it’s easily hijacked by your worst enemies.

So keep a vigilant watch over what’s happening up there. The more mindful you are of your thoughts, the better you’re going to feel about yourself and about life.

4. Your thoughts are not you, and you are not your thoughts.

It’s natural to observe those thoughts buzzing in your brain and say, “Oh, that’s me.”

But it’s not you. If it were you, then who’s the one observing those thoughts and saying “That’s me”?

You can’t directly observe the raw perceptions and feelings that form your current character and personality, just like you can’t directly see your own eyeballs. Your thoughts act as a wondrous kind of mirror—but a crude mirror, displaying only a very muddy reflection of what your brain and heart are up to. It may display ideas and emotions, but its fabric is the language(s) you’ve learned, things you’ve seen and sounds you’ve heard.

Think of thoughts as a kind of clothing. Just like you can change your clothing whenever you wish, so you can switch uncomfortable, unbefitting thoughts with thoughts that bring out your inner resilience and beauty.

So don’t say, “What can I do? Those are my thoughts. They’re miserable thoughts, so I’m depressed.”

Instead, say, “Hey, what’s the point in wearing these depressing thoughts? They’re not helping me. They’re not providing anything worthwhile. I could think positive, uplifting thoughts instead.”

Now that’s power—power to change. And the ability to always be changing is a key to a good life.

5. Keep a set of healthy thoughts always in your pocket.

What do we think about? Whatever we experience, talk about and read about.

So if you make it a habit to keep a small set of wholesome things that you’re talking about, reading about and thinking about, you’ll always have something good to switch your mind to when toxic thoughts invade.

Even better, memorize. For thousands of years Jews have memorized the Psalms, key passages of the Torah, the Mishnah and other key works, and repeated them over and over every day and even while at work. Memorizing means to engrave the words in your heart. They become a component of your psyche. When you’ve achieved that, you’ll find those words spontaneously and almost effortlessly running in the background.

But Jews have always also pondered the meanings of everything they set to memory, extracting new lessons from the weekly Parshah, wrestling with the debates of the Talmud, contemplating the secrets of the Kabbalah and, most importantly, applying the wisdom of Torah to their daily life.

We have inherited a wealth of magnificent wardrobes for the soul. Everyone can find beautiful thoughts hanging in those wardrobes to dress up in, to provide strength in times of challenge, comfort in times of distress, and joy and peace at every point in life.

The Baal Shem Tov taught that where your head’s at, that’s where you’re at, all of you. Find good thoughts to fill your head with, and keep them always handy. When you take a break, go for a walk or find yourself cruising down a clear highway, take out one of those thoughts and chew on it.

6. Your reactions feed your thoughts.

Let’s say some thought jumps into your mind and scares you. Maybe it was a nasty thought about a good person. Maybe it was some low-life fantasy. Or a memory of some experience you thought you had already put out of your mind.

You’re thinking, “How could I have even thought such an ugly thought?!”

You just put that thought on steroids.

Thoughts are fed by our reactions to them. Don’t react, and the thought dies.

The only effective strategy with unwanted thoughts is to stay a cool, impartial observer of that thought, just long enough to notice that it’s something to steer away from. Then bounce off into one of those wholesome, healthy thoughts you’ve stored for just such a moment as this.

That strategy actually makes you stronger each time. And you can thank those ugly thoughts for challenging you so you can further develop your mind power.

Later, you can ask advice from a mentor, who might tell you that . . .

7. Not all thoughts come from thinking.

Ugly, toxic thoughts are symptoms of an emotional whirlpool—and we all have those whirlpools. Those emotions are you, but you can’t pull yourself up by tugging at your own heartstrings. You don’t want to step near there without a mentor or a good and wise friend who can pull you out.

It may be that some anxiety-provoking issue is swirling around in your life, and you just need to talk it through with someone who knows you well and cares about you.

Or it may be that you’ve just become more sensitive to your thoughts, and now you’re noticing the junk that’s been lying around up there all along.

In many cases, however, you need to surrender to the fact that it’s perfectly natural to have such thoughts, and now you need to flood your mind with more healthy thoughts, speak more healthy words and do more healthy things.

8. Practice whenever the opportunity arises.

Switching thoughts in midstream is not always easy. It’s certainly easier to switch actions or choose which words to say—and which not. And by practicing self-control in those easier situations, you’ll find yourself in a far better position when wrestling with your thoughts.

For example, say you just saw a chocolate bar, and your impulse is to grab it and stuff it in your mouth.

Instead, pick it up and stare at it for a short while. That’s right—just delay your gratification. Slowly and deliberately say the blessing over chocolate. Now you can put a small piece in your mouth.

What was the point of all that? Besides cultivating a more mindful, human existence, you are also exercising your muscles of mind control.

Or say you’re sitting with your friends, and you have an urge to blurt out a few words that you think will make them laugh. Hold on to those words. Just stay quiet. Then, a few minutes later, if it’s still appropriate, say what you had to say.

You just made yourself a mighty master of the mind. You may have also avoided inadvertently hurting someone’s feelings.

Actions and speech are much easier to control than thoughts. Gain some control over what you do and how you speak, and controlling your thoughts will become oh-so-much easier.

9. Healthy thoughts are deep thoughts.

Learn to think long and deep nourishing thoughts. The only time your brain is truly engaged is when it’s fully engaged for more than a few seconds. Only then can those thoughts make any dent in the way you feel.

In Winning the War Against Contemplation, I gave some advice on how to develop and sustain a thought. But the real hack is to just allow magnificent, deep and beautiful thoughts to hijack your mind. That’s what the Tanya and Chabad thought are out to provide—thoughts that sweep you off your feet, if you’ll only give them the chance.

Like anything good, it takes effort and practice to get yourself into the mode. But once you’re in the habit of pondering these thoughts deeply, they return all on their own and grab the controls.

Here’s a Tanya thought to try:

Fix your mind on the vastness of this creation, the depth of wisdom, ingenuity and beauty invested in its every particle. A great consciousness fills all this creation, much as your soul fills your body and directs it.

Now think of the core of that consciousness that lies infinitely beyond the entire creation. Envision this great Consciousness reaching out to you with unbounded love, asking you to join in a private relationship with Him.

As you bring Him into your life by pondering His wisdom and the beauty of His works, sharing with Him the innermost concerns of your heart, reaching back to Him in love and awe, your spirit bonds with His.

As you utter the words of His wisdom that flow to us through His Torah and its sages, your lips join with His in every word. As you fill the world with that infinite light by fulfilling your particular mission in this world, doing the mitzvahs He has entrusted into your hands, you embrace Him and you are embraced by Him from head to toe.

Hold on to that thought for long enough, says the Tanya, and the human heart cannot help but mirror that boundless love, and even the hardest heart will melt like wax before an intense blaze.

10. If your thoughts are ablaze . . .

What do you do when your brain has broken loose and has run off like a wildfire?

Sometimes it’s an obsession that won’t allow you to think anything else, or anger, or indignation. The author of the Tanya once asked, “What do you do if you feel you’re surrounded on all sides by a fire of passion? You should imagine yourself surrounded by a wall of fire. What would you do then? Well, you would walk right through it, of course. After all, it’s just your imagination.”

Sometimes it’s just an exhausted, stressed-out brain that’s demanding some free time. Hey, have some pity on your gray matter and give it a break!

But sometimes it’s a deluge of crazy thoughts, and you can’t do a thing about it. Then, advises the Tanya, throw yourself before your Creator, and plead to Him to save you from this deluge. Our Creator breathes within each one of us and cares for us, and as a parent runs to save a child, so light and inner strength will come to rescue you from the deluge.

No, it’s not easy to stay in charge of your own thoughts, but it’s certainly rewarding. It’s your brain, after all, and the human brain is still the most sophisticated device we know of. Why shouldn’t you be the exclusive user?