Mardy Fish, who in his first public match since the U.S. Open lost a pro set to Novak Djokovic at the LA Tennis Challenge on Monday, says he nearly called it quits. The 31-year-old American has been dealing with heart trouble since early last spring, as well as the emotional stress that came along with it.

“I’ve retired 15 times in my head—literally,” he told a small group of reporters in Los Angeles. “For the first three to four months [after the 2012 U.S. Open] I was done for sure, but then gradually you start feeling better and gaining more confidence and your body feels better and you start working out, start missing Australia and watch a little tennis and you miss the guys and the competing.”

It was the first time that Fish has spoken publicly since the 2012 U.S. Open. Last summer, he admitted to being unable to sleep because he feared he would never wake up.

However, Fish does not want to say exactly why he hasn't played since New York.

“There were times I felt really good and there were others I didn’t at all,” he said. “I had good weeks and bad weeks. I’ve gone back and forth to spill it all, to keep it in, or keep it with people who are closest to me. The bottom line was what I went through is toughest thing I’ve ever had to deal with. It’s not something that's easy to talk about. It was as hard on my wife as it was on me. I still have to come up with the right time to play. I thought the right time was San Jose, then Memphis, now I think the right time to play is Indian Wells. I haven’t felt better than this since U.S. Open, but you can’t take it for granted.”

Fish conceded that what occurred was a combination of physical and mental factors.

“The fear of the unknown was one of my problems, and in the immediate future is something I have to battle,” Fish said. “It’s not anything that I have to run off the court in the middle of match, but it’s something that’s very uncomfortable, the fear that something might happen. It took me months to get back to normalcy to have a glass of wine at dinner and go out to a movie with my wife. Those normal things you take for granted.”

Fish, who reached a career-high No. 7 ranking in 2011, said he had to face that fact that his heart trouble will always be with him and that he could not just wish it away. He added that he has kept a very strict and healthy schedule at home where he goes to bed early every night, so re-adjusting to the odd hours of the pro tour will be challenging. But he felt that playing Djokovic in front of 8,500 people at UCLA’s Pauley Pavilion—and making a solid showing—was a positive step.

“Tonight was big test in a setting with a lot of people,” the now-world No. 32 said. “It certainly felt like there a lot of pressure. I don't feel 100 percent, but I am getting really close. You can’t duplicate that stuff in practice….It’s just time and it’s the next step. I don't feel like I have anything to prove, and I feel like I have years more to play.”