When faced with a challenge, whether you deny the problems it poses or dive in to solve them in a positive way may determine how much anxiety you feel overall.

According to the National Institute of Mental Health, about 40 million Americans ages 18 and older are diagnosed with an anxiety disorder every year. To dig deeper into who may be at greatest risk, investigators from the University of Illinois at Urbana-Champaign surveyed 179 healthy men and women and asked them how they dealt with their emotions and how their answers correlated with their level of anxiety in a variety of settings.

Previous studies hinted that different strategies that people use to handle emotional situations could impact how much anxiety they felt in general; those who tended to focus on positive ways of resolving difficult circumstances, for example, experienced less nervousness, tension and negative emotions compared with those who avoided challenging situations and suppressed negative and uncomfortable feelings. The scientists in the current study, published in the journal Emotion, wanted to explore the relationship further to see whether the more positive emotional strategy could offer more resilience and protection against anxiety than the suppressive approach.

The participants all answered questionnaires designed to measure how much they were focused on achieving goals, whether they tended to control their emotions by reappraising challenges in a more positive way or whether they tried to ignore and suppress difficult feelings. For example, they rated how closely their behavior aligned with the statements, “I control my emotions by changing the way I think about the situation I am in,” and “I keep my emotions to myself.” They also responded to questions about their anxiety level during different situations such as when giving a report to a group or going to a party.

Comparing their responses, the researchers found that the participants who regularly reframed what was happening to them to view their situation in a better light reported less severe anxiety than the participants who suppressed their emotions in trying situations.

This strategy is called reappraisal, and those who practiced the tactic were more likely to view tough situations as challenges rather than problems, and reported less overall anxiety and social anxiety compared with the participants who tried to ignore their emotions instead.

The results suggest that there may be behavior-based ways of addressing anxiety that people might be able to learn. Seeing difficult experiences as opportunities rather than setbacks requires being flexible enough to find new solutions to problems. People who tend to take this approach, say the study authors, are goal-oriented and able to put individual situations into perspective, realizing that a single trying situation doesn’t necessarily signal doom.

Those who focus on trying to avoid negative situations, while perhaps being proactive, may open themselves up to internalizing symptoms of anxiety and stress more, which can have harmful effects on health. Suppressing emotions may not allow for a productive outlet for frustration or fear, and that could make those who adopt this approach more vulnerable to anxiety.

But the researchers say the findings don’t suggest that anxiety is an all-or-nothing state. A little anxiety can work to a person’s benefit if it enforces concentration and efficiency, like getting work done on a deadline. There may also be situations in which different strategies for handling—and even controlling—emotions is appropriate. In some workplace or social settings, for example, having the self-control to refrain from acting out or saying something regrettable could save a job or friendship.

Not surprisingly, the researchers say it’s about being flexible enough to know how much to regulate emotions and learning to be more flexible when faced with challenging situations. Being adaptive can come more easily to some than others, but many of the strategies for regulating emotions in this way during crises can be learned. “This is something you can change,” said Nicole Llewellyn, the lead author of the study and a graduate student in psychology at the University of Illinois, in a statement. “You can’t do much to affect the genetic or environmental factors that contribute to anxiety. But you can change your emotion-regulation strategies.” And those changes could translate into a more lasting resilience against stress.