Most of us yearn to bump up our game. Indeed, telling ourselves we’re better than the competition is so central to the American psyche that self-doubt can seem almost unpatriotic. But does egging ourselves on really help us to get better at anything?

Psychologists have long known that “self-talk” or “self-instruction”—that is, the stories we tell ourselves to change unwanted thoughts and behaviors—can also transform moods. As one feature of cognitive-behavioral therapy, self-talk—such as saying, “I am an interesting person who can make new friends” or “I can focus on one task at a time”—helps depressed people to revamp their way of thinking and thus their ability to cope.

Now a massive online study suggests that such talk can help us not only to manage our feelings but also to boost our performance—and relatively quickly, too.

The recent study takes its cue from sports psychology, which shows that self-instruction can push athletes to persist on quick tests of endurance or on highly technical bursts of effort, such as volleyball serves.

British sports psychologist Andy Lane at the University of Wolverhampton led the experiment in conjunction with the BBC Lab, a (now closed) arm of the broadcasting service, which invited volunteers to be citizen scientists. In an interesting twist on attracting research subjects, actor Ricky Gervais and Olympic sprinter Michael Johnson promoted the study on BBC TV before the 2012 London summer Olympics. Nearly 45,000 people participated, an enormous sample for a study in psychology.

The volunteers filled out questionnaires on home computers about their emotions and played a series of online number-finding games, with instructions and feedback narrated by Mr. Johnson. The yearlong study came out in March in the journal Frontiers in Psychology.

After completing practice and baseline tests, participants were randomly assigned to one of four groups: self-talk, imagery (e.g., imagining oneself reacting more quickly), “if-then planning” (e.g., planning a reaction to what might happen while competing) and a control group, which encouraged reflection on performance but didn’t give any instructions or motivational hints. The subjects had to beat their previous performance as well as an “opponent”—actually a computer algorithm matched to their skill level. The scientists wanted to know which of the interventions would help people to manage their emotions when under pressure.

Click for more from The Wall Street Journal.