CHICAGO – When Sonny Gray was added to the National League All-Star team in July, he says his mindset changed. It gave him confidence that he was one of the best pitchers in the league, so he felt like he needed to start acting like it.

For the last three months, he’s backed it up.

Since the All-Star break, Gray has yielded a 6-2 record and 1.91 ERA with 96 strikeouts and 33 walks in 80 innings. There are four pitchers in the Major Leagues with a lower ERA than Gray in the second half of the season: Jack Flaherty (1.05 ERA), Jacob deGrom (1.69), Justin Verlander (1.79) and Gerrit Cole (1.90).

Houston Astros teammates Verlander and Cole are competing against themselves for the American League Cy Young. Los Angeles Dodgers right-hander Hyun-Jin Ryu is the leader in the NL, but there are several candidates bunched behind him.

With two starts remaining in the season, Gray could put himself in a position to command fourth or fifth place Cy Young votes. After Tuesday’s start, Gray leads the NL in opponent batting average (.196), ranks fifth in ERA (2.80), eighth in WHIP (1.09), 11th in strikeouts (199).

The top candidates for the NL Cy Young: Ryu (12-5 record, 2.35 ERA, 168 2/3 innings, 148 strikeouts), Washington’s Max Scherzer (10-7, 2.81, 166 1/3, 233), deGrom (9-8, 2.61, 190, 239), Atlanta’s Mike Soroka (12-4, 2.57, 164 2/3, 130) and Flaherty (10-8, 3.05, 174 1/3, 206).

“I think it is nice and is important to get recognized for accomplishments and recognized for what you do, but I don’t think it is the most important thing,” Gray said. “The most important thing to me is just getting back to having joy playing baseball.

“I’ve always considered myself on one of the best pitchers in the league ever since I’ve come into the league. That’s just how I went about things. I think outside recognition is cool to get and cool to have, but at the end of the day, it doesn’t define you. It doesn’t define what you’ve done. It doesn’t define the obstacles that you’ve overcome.”

Gray finished third in the AL Cy Young voting in 2015, his third season with the Oakland A’s. He’s recorded similar numbers, though he will finish with fewer innings.

In 2015, Gray had a 14-7 record with a 2.73 ERA in 31 starts. He struck out 169, walked 59 and allowed 17 homers in 208 innings. He posted a 1.082 WHIP.

His numbers this year: an 11-7 record with a 2.80 ERA in 30 starts. He struck out 199, walked 66 and gave up 16 home runs in 170 1/3 innings. He owns a 1.086 WHIP.

“First and foremost, it starts right here,” said Gray, pointing at his head. “I think a lot of times before, you’re like, I need to fix my slider, or I need to fix my curveball, or I need to figure out how to throw my fastball in this location or I need to figure out how to do this. I think the first thing you have to do is fix yourself in between your ears. If you’re able to do that and completely flip the script on what you expect yourself to do, I know for me that’s been incredibly important.”

Gray credits pitching coach Derek Johnson, who was his pitching coach in college, for helping him during his breakout year. Gray struggled with the New York Yankees last year and was removed from the rotation by the end of the 2018 season.

“You can’t fix any pitch or you can’t fix any pitch sequence or the pitch shape of a slider or how you throw this pitch or when you throw this pitch until you fix your head,” Gray said. “It’s a mindset. It’s just incredibly important. You see with guys pitch with confidence, right? What is that? You can describe that in any way you want, but you can tell. When you see a (confident) pitcher, he just has a different aura about him.

“If you just want to talk about stuff, everybody’s got stuff. So, what’s different? How are you going to separate yourself from everyone else? I think it just has to start there. It did for me, for sure.”

Gray has allowed two or fewer runs in 13 of his last 15 starts. During that stretch, he made 10 starts against teams with above .500 records.

“If you feel confident in yourself and confident in your ability, then you’re going to go out there and perform better,” he said. “It’s just going to happen.”