TAMPA, Fla. -- Yankees starting Masahiro Tanaka knows where last season went wrong. He knows where it went right, too.

It was in his head.

"I think when things were not going my way and I really wasn't able to get out from under that frustration, I think my mind was geared a little bit more toward negativity," Tanaka said at George M. Steinbrenner Field on Wednesday. "That was pretty much the problem. I kept on grinding and fighting through it, to change that negative to a positive."

Tanaka, who also threw his first bullpen session of the spring Wednesday, said his miserable first half (7-8, 5.47 ERA in 18 starts) was the product of mechanical problems and a bad mindset.

"Those are probably the biggest reasons that took me kind of off balance," he said.

He rebounded in the second half, going 6-4 with a 3.77 ERA in 12 starts as the Yankees ran away with the American League Wild Card. In the playoffs, he found even more sharpness, going 2-1 with a 0.90 ERA.

"I felt that I was able to make enough adjustments so that I was able to perform at a pretty high level as we went into the later part of the season," he said.

Before last season, he had a 3.12 ERA in three years with the Yankees. The rough 2017 ballooned his career ERA to 3.56.

The mixed performance -- and the partially torn ulnar collateral ligament in his right elbow -- may have helped push Tanaka to not use the opt-out clause that lingered for a while this offseason in his contract.

Instead, he decided to stay with the Yankees and collect the final $63 million he's due over the next three years.

Tanaka, however, said he remained in pinstripes because he wanted to win in them.

"The reason why I wanted to come back to New York was to be a part of this team, fight with this team to capture a world championship," said Tanaka, last year's Opening Day starter.

The Yankees haven't named an Opening Day starter for 2018 yet.

New Yankees manager Aaron Boone said he liked what he saw in his first up-close look at Tanaka on Wednesday.

"It was good to stand behind him and watch him come out. He was really sharp for day one of camp," he said. "He looks like he's in a good place. He's in really good shape. I'm just excited from what I saw in him and excited for what he's obviously going to bring to our team."

Brendan Kuty may be reached at bkuty@njadvancemedia.com. Follow him on Twitter @BrendanKutyNJ. Find NJ.com Yankees on Facebook.