“That’s something I’ve been working on. I use the expression of ‘dumb yourself down’ a little bit, I think. When you’re out there, the less you can think, the better.”

Anderson’s mind also drifted to a dangerous place during the match against Murray: his fourth-round loss at Wimbledon, where he had a two-set lead against Novak Djokovic, the top seed and eventual champion, before losing in five sets. After working with a sports psychologist, Anderson has used visualization techniques between points — “that’s when you’re thinking the most” — to keep himself steady.

“Especially in a match like yesterday, when things are getting so excited, and there’s so much energy out there, I’m just staying calm, staying focused,” Anderson said. “I felt like I’ve been doing that well in all my matches.”

The Andersons are based in Delray Beach, Fla., and although he is married to an American, Anderson still represents South Africa. His nonparticipation in the Davis Cup, however, means he will not be eligible for the 2016 Olympic Games.