My heart starts racing before I hit the weights, before I warm up—hell, even before I even walk into my new gym. I feel the pins and needles in my armpits that make me glad I switched to my boyfriend’s deodorant. I’m not working out yet: I’m just thinking about working out. As someone who has strong-armed anxiety for the better part of her time on earth, I know the drill. But I don’t like it, and new gyms seem to be rife with triggers for me. (Yes, it’s ironic that I’m a personal trainer.)

I spend a lot of time in the gym because, amid the SSRIs, benzos, genetic testing, individual therapy, and group therapy, I firmly believe that exercise is the best thing I do for my mental health. Most people have at least a fuzzy idea that exercise is good for mental health, but that discussion often starts and ends with depression (which, yes, I deal with, too). And while exercise can be helpful for dealing with depression, the effects of regular movement on anxiety are starting to get some of the attention they deserve, too. By one study’s estimates, regular exercise may reduce symptoms of anxiety by as much as 20 percent.

So far, it seems that exercise’s impact on anxiety is linked to an exposure effect (think: holding a spider if you’re scared of spiders). The physical symptoms of anxiety and the body’s reactions to exercise are pretty similar—i.e., the heart-pounding pit stains—as one study of people with heightened sensitivity to anxiety found. In cases of anxiety, the emotional response tends to be fear. But in that study, after establishing a regular exercise routine, people became less sensitive to day-to-day anxiety. Exercise may teach people to associate their racing hearts and sweaty pits with safety, not danger, the researchers concluded.

It’s why, even if—and when—I feel anxiety walking into a new gym, I do it anyway. I say, “Oh, yep, there it is” and move on. I know that even if my pits are sweaty, I’m okay, and that the hour ahead will be one of the best in my day. And it pretty much always is. If that's the point you're trying to reach, this guide might help. Let's start with the big questions.

Why does going to the gym make some people feel anxious?

At some point, pretty much everyone has experienced some degree of social anxiety, which is intimately linked with performance anxiety, says L. Kevin Chapman, a Kentucky psychologist and a member of the Anxiety and Depression Association of America. “Social anxiety is technically a marked fear of social or performance situations in which negative evaluation may occur. This negative evaluation can occur in any social situation, but the gym is a perfect platform for people to potentially look at and judge you and your performance.”

Chapman explains that the potential for negative evaluation is heightened when you do anything new or that you haven’t mastered, or simply when you’re around new people or in a new setting. After all, even if I feel confident walking into my regular gym, working out in a new one—where I don’t know the layout or have to thoroughly examine a machine to figure out how to adjust it to my 5’2” frame—I feel ridiculous. “Are people watching me?” I think. “Please don’t let anyone come up to me trying to help.”

So why are we all so wound up? Partly because it works: “Human beings are wired to scan for friend or foe, and then make a decision on what to do or where to go based on that,” says Stephen Graef, a sports psychologist at The Ohio State University Wexner Medical Center. This evolutionary behavior allowed us to form tribes of trustworthy pals, keep our distance from enemies, and generally be safe.

When you go to the gym, Graef says, one of two things happen: Either everyone looks at you—or no one looks at you. “Both can be perceived as threatening to someone going into a new environment. It’s like everyone is already part of this gym tribe you don’t belong to,” he says. “Like walking into a cool party—and you don’t have a plus-one.”

Social and performance anxiety aside, the gym makes us feel uncomfortable in other ways, too—for one, you're keenly aware of your body, everyone else’s bodies, and how they rank, Chapman says. That’s not because we're insecure or screwed up—again, it’s just how the human mind works. At some point, it probably served an evolutionary role, Chapman adds. Upward social comparisons—the ones that make us feel like shit—spur us to grow, improve, learn new skills. Downward ones—which make us feel super-superior—encourage us to rest on our laurels.

Our minds, in other words, might be set up to compare us to people who are “better” than us so that we'll aspire to be like them. While constantly trying to improve is mostly a good thing, after a certain point upward social comparisons start to make us get down on ourselves—which is counterproductive to making a positive change.

How does anxiety affect my motivation to work out?

In short, anxiety is really effective at at encouraging people to avoid the gym. “The hallmark feature of anxiety is avoidance,” Chapman says. “The problem with avoidance is that it does provide some relief. And although it’s temporary relief, it perpetuates the feeling of, ‘as long as I avoid the gym, I’m safe.’”

Here’s a scenario: I’m on my way to the gym and I feel super-anxious—like, about-to-throw-up anxious. I decide, “not today.” I go home and turn on The Office, and I feel a lot better. Feel-good hormones are flowing. I’ve just grooved the thought pattern, “gym bad, home good.” That will affect me the next time I attempt to go to the gym. “Each case of avoidance will increase anxiousness during the next attempt,” Chapman says.

But even if you manage to “push through it,” gym anxiety can still negatively affect you. When you’re thinking about everyone looking at you or the shit-show that’s you getting stuck under a squat bar, of course your workout is going to suck: You’re not going to be on top of your form, you’ll likely lose count of your reps, and you’ll flood your body with stress hormones, Chapman explains.

While a certain level of what sports psychologists call "psychological arousal" is needed for athletes to zone in, excess arousal inhibits performance. Could pro athletes compete if they spent the whole game worried about the trash talk from the guy in the second row? Nope. And you can’t, either.

How do I overcome my new gym anxiety?

The only way through it is through it, Chapman says, stressing the importance of exposure therapy. Just as exercise teaches you to not freak out when your heart starts racing, walking through the gym’s door even when you’re feeling anxious teaches you that you’ll survive what’s on the other side, he says.

Over time, and with enough exposure, the anxiety will lessen. Exactly how long that takes varies per person and situation, but taking steps to make your experience more positive and less of an unknown can help speed the process. That could start by selecting the right gym for you—one that has a customer base and culture that makes you safer and less like an outsider, Chapman says. This is part of what recently made me change gyms: My therapist and I decided that I needed a better environment. My new gym is a safe space—it says so right on the door—and it makes my anxiety around finding everything and adjusting certain machines a lot lighter.

When considering potential gyms, visit in person and get a tour, ideally at whatever time you imagine yourself regularly going. Purchasing a day or week pass can help you feel things out. Despite the anxiety that it will cause, trialing multiple gyms can make you find the best fit and be the best solution in the long term. After you commit to a gym, working with a trainer can potentially also relieve anxiety. A trainer can show you how to use certain machines and help you master unfamiliar moves, Graef says. That said, for some people, meeting a trainer can be incredibly anxiety-inducing. So it’s important to think through what’s going to be the most comfortable for you.

If you decide to work out solo, know exactly what you're going to do during your workout before you walk in the gym. For example, with my online trainees, all of them have a workout plan to follow, but I never want them going over the plan for the first time in the gym. I assign them a series of exercise demo videos, read all of the move descriptions, and review the most technical moves via Skype before hitting the weights. That way, when they walk into the gym, they know exactly what they are going to do, how they're going to do it, and what equipment and weights they'll need. They don’t have to try to figure out exercise form or anything else with an audience.

Similarly, I’d encourage you to write down, screenshot, or print out your workout and practice any new moves at home—even if it means deadlifting sans-weights—before heading to the gym when you know you’ll be anxious or uneasy. Think through your gym’s layout, and how you might be able to carve out a little section just for you. While hoarding gym equipment isn’t cool, placing a mat in an empty corner of the gym and then performing all of your exercises there—taking weights back and forth as any polite exerciser does—can help you feel cocooned.

When working with trainees who have never been in a gym setting before, I also find it helps to walk them through wiping down benches, wrangling weight clips, and where it’s appropriate to do on-the-floor exercises. If you have similar concerns when it comes to basic gym etiquette, talk to any of your gym-loving friends and ask them to walk you through the protocol. When you take a tours, ask if you need to bring your own towel or lock. Get all of your questions about gym-ing answered before your first workout. “People who are prone to anxiety tend to feel uncertainty as threatening,” Chapman says. “Any knowledge that you can gain in advance will decrease anxiety.”

Finally, there are a lot of other little things you can do to feel more at ease—from blocking out the world with headphones, to bringing a buddy, to choosing an outfit that makes you feel comfortable in your skin. But what I've found to be most helpful is the simple reminder that people are probably paying a lot less attention to you than you worry they are. Realizing that anxiety is just part of the human experience and—despite our worries—people aren’t noticing us, can be incredibly helpful at normalizing and de-escalating anxiety, Chapman says. As he jokes with his patients, “You aren’t as important as you think you are.” It's why, when my heart starts racing before a workout, I say “OK, there it is.” And then I move on. If anything, I wonder if I can count it as part of my warmup.