OAKLAND, Calif. -- Feeling better and healthier nearly two months after taking a medical leave of absence, Cleveland Cavaliers coach Tyronn Lue said he has been getting treatment for anxiety.

Lue had been having chest pains and occasionally coughing up blood when he left the team in March. He was unable to coach the second half in several games before stepping away to deal with the issue. A diet change and medication have helped him.

"I'm glad it wasn't anything serious," Lue told ESPN's Rachel Nichols in an exclusive interview. "Just anxiety, and the medication I'm on is great. No more chest pains, so everything's been great."

Lue had a battery of tests in the months leading up to his decision in mid-March to step away, and it was determined his symptoms were, in part, the result of anxiety. During the two weeks Lue was away, he was able to get some rest, make lifestyle changes and begin a medication routine that helped reduce some of the stress.

"I think for the first time in my career, 20 years, I had a chance to focus on me. It wasn't as bad as people thought it was. But I did have some chest pains for the last couple of years. And I was just trying to be able to get through it not knowing what was wrong with me," Lue told Nichols.

"So the two weeks I took off, just finally had a chance to focus on myself and change my diet. Hired a chef. Stopped drinking as many Shirley Temples. And stopped with the sweets and got back to taking care of myself. Now I feel great."

Lue said he got support from his players, coaching staff, management and others around the league. One of the people who reached out was Golden State Warriors coach Steve Kerr, who has dealt with complications from back surgery over the past two years that have required him to step away from the team at times.

"When you're in this position, you're in the NBA, and you have your family and your friends and everybody you want to take care of and make sure they're comfortable, you kind of lose sight of yourself and what it takes for you," Lue said. "So being able to do that and get sleep now regularly is great."

Lue said he knew at the start of the season this was going to be a harder path to return to the NBA Finals in the wake of the Cavs' decision to trade Kyrie Irving last summer. But the team ended up having a tumultuous regular season with losing streaks, major roster turnover and players dealing with an array of personal issues. Lue delayed focusing on himself at times because he wanted to be stronger for others.

"I think when you're going through a tough season, tough stretch, it's easy to say you're going to bow out. And I didn't want to be that guy. It was tough," Lue told Nichols. "LeBron [James] playing all 82 games, I wanted to be able to coach all the 82 games and give the team everything they needed."

Lue said having James on the team leads to additional scrutiny that can be a challenge to everyone in the organization. He compared it to the way the Warriors are closely watched and Kerr's relationship with players like Draymond Green and Kevin Durant is analyzed.

In general, Lue isn't a fan of the attention he gets as head coach of one of the world's most prominent teams, but right now he's enjoying some of the payoff, being in the Finals for a fourth straight year.

"I don't like the attention. But I love coaching. I love when you're able to succeed and seeing the look on guys' faces," Lue said. "A lot have not been to the Finals, the George Hills and Jeff Greens, and all those guys having a chance to go to the NBA Finals and play for the championship, that's when it's worth it. And it feels good, and all the guys feel good, so I'm happy that we're here now."