Sir Cliff Richard broke down as he told a High Court judge about the effect that the BBC coverage of a police raid on his home had on him.
The 77-year-old singer said he felt “forever tainted”.
He said his health had suffered and that he had never lived in the apartment again because it had become “contaminated”.
Sir Cliff has taken legal action over BBC coverage of the police search, which was staged after a sex-assault allegation.
A barrister leading Sir Cliff’s legal team says BBC coverage of the search at the singer’s apartment in Sunningdale, Berkshire, in August 2014 was a “very serious invasion” of privacy.
The BBC disputes the singer’s claims. Bosses say coverage of the search was accurate and in good faith.
Mr Justice Mann began overseeing a trial at the High Court in London on Thursday.
Sir Cliff began giving evidence on Friday. He has made a written witness statement and answered lawyers’ questions in court.
The singer told of the “impact” of the broadcast.
“It was shocking and upsetting,” he said in his witness statement.
“My health suffered, both mentally and physically.”
He added: “At one point... I actually thought was going to have a heart attack or stroke.”
Sir Cliff said he was conscious that people around the world might think he was a “serious criminal”.
“It felt as though everything I had worked for during my life - trying to live as honestly and honourably as I could - was being torn apart,” he said.
“I felt forever tainted. I still do.”
Sir Cliff said he waited 22 months, between August 2014 and June 2016, before finding out that prosecutors were not “going to be taking further action”.
He said during that period he “never felt right at all”.
“During the day, there was an ever present knot in my stomach,” he said.
“I’d wake up in the middle of the night, going over things in my head again and again.”
He said he lost a “considerable amount” of weight.
“Sometimes I looked in the mirror, and it felt like someone else, a much older version of myself, was looking back at me.”
He said he had felt unable to return to his Sunningdale apartment.
“I never went back except to pack up my belongings,” he said.
“In my mind it had become contaminated. I didn’t feel comfortable there any longer. I have in fact been burgled before, and this for me was a worse experience.”
Sir Cliff later broke down as he told the court his name had been “smeared” all over the world by the BBC’s actions.
The singer choked up as he listed a number of countries - including Holland, Portugal, Hong Kong and Singapore - where he claims his reputation was damaged.
He said: “Everywhere I have ever been, I felt my name was smeared. The police didn’t do that, the BBC did.”
He clasped his hands to his face before adding that the journalists involved “felt they were above the law” and “above the Leveson report”.
Lawyers have told Mr Justice Mann how in late 2013, a man made an allegation to the Metropolitan Police, saying he had been sexually assaulted by Sir Cliff during an event featuring evangelist Billy Graham at Sheffield United’s Bramall Lane football stadium in Sheffield, when a child in 1985.
Metropolitan Police officers passed the allegation to South Yorkshire Police in July 2014.
Sir Cliff denied the allegation and in June 2016 prosecutors announced that he would face no charges.
A BBC spokesman has said that the BBC had reported Sir Cliff’s “full denial of the allegations at every stage”.