There can be victory in defeat.

Los Angeles Dodgers pitcher Rich Hill just missed throwing a no-hitter on Wednesday night when he gave up a walk-off home run against the Pittsburgh Pirates in extra innings on his 99th pitch, losing the game. Hill also just lost out on a perfect game after the third baseman made an error in the ninth inning.

But when Hill approached the press afterward, he gamely stuck up for his teammate, and vowed to come out swinging again.

“I’m looking forward to tomorrow, getting in the gym and getting ready for the next outing,” said Hill, 37. “We have a lot of great things going on here. Tomorrow is a big game. We have to take the series and get back home.”

Now that’s how you handle a loss like a boss – even as you make history for losing a game on just one hit in 10 innings.

“Everyone likes to be around a winner – and that doesn’t mean the person that wins the most games,” career coach Heather Monahan, a.k.a. The Boss in Heels, told Moneyish. “That means the person with the winning attitude.”

No one’s perfect, and it’s inevitable that we’re all going to bomb a sales pitch, presentation or some other work project at some point, or be on the losing team. So here’s what we can learn from Hill about turning a loss into a win.

Accept what you can and can’t control. Dr. Jonathan Fader, director of mental conditioning for the New York Giants who was the New York Mets’ team psychologist for nine seasons, told Moneyish that recognizing what is and isn’t in your hands helps to just let it go when it doesn’t work out. “Nolan Ryan once said that a pitcher has two jobs: To choose the pitch and to execute it. What happens after that is out of your hands,” Dr. Fader said. “Likewise, if you’re a trader, you can pick this stock based on all of the statistical variants you know, but you don’t have any control over unexpected bumps in the market,” which can send your stock plummeting.

Take a beat to reset yourself. So exactly how do you “shake it off” or “let it go?” Dr. Fader coaches players in mental conditioning and mindfulness to do a quick “reset” right after something goes wrong. “When you watch baseball players closely, you’ll see the pitcher or the batter taking a deep breath before each pitch, or looking at a focal point, like a blade of grass or a flagpole, to center themselves,” he said. “Approach each moment independently.” So if an interview isn’t going well, or you get off to a rough start during a presentation or performance, just focus on something in the room, take a deep breath and start over.

Embrace a new perspective. Dr. Fader’s players also practice gratitude, which helps them to be good sports through wins and losses. “If you think, ‘I am so grateful that I get to compete at the highest level,’ the one or two negative results don’t loom as large,” he said. Apply that same approach to your job – you’re lucky that you get to do what you love, or you’re blessed to have a gig that supports your family, or you’re working with a great team. That appreciation can help you take setbacks in stride.

Build resilience. Losses feel catastrophic in the moment, so look at the big picture: You’ve survived worse, and you can survive this, too. “While dropping the ball on a new account and taking a professional hit can be difficult, that can never compare to other personal challenges in your life that you have overcome,” said Monahan, who suggests keeping a journal of the tough times you’ve already handled. “Reminding yourself of traumatic situations that you have lived through will bring your strength and the ability to see your current situation as less than dire in the moment.”

Take action. Hill didn’t dwell on the perfect no-hitter that wasn’t. He told the press that he was already looking to Thursday night’s game, and planning to hit the gym. “The decision to take action and change your situation is the single most impactful thing you can do,” said Monahan.  “What action can you take today to change your situation and set you up for success the next time opportunity knocks on your door?”