Soham detective Brian Stevens choked back tears at the Old Bailey as he relived the moment he told Jessica Chapman's family that she was dead.
Brian Stevens and friend Louise Austin are on trial at the Old Bailey
The police liaison officer dabbed his eyes with a handkerchief as he recalled his relationship with the Soham family.
Mr Stevens and friend Louise Austin are accused of concocting a false alibi for him after he was accused of downloading pornographic material.
Both deny a charge of conspiring to pervert the course of justice.
On Wednesday, Mr Stevens told the court he had considered suicide after he was accused of downloading pornography. The case against him was not pursued because of lack of evidence.
He said: "Every time my name is mentioned it inevitably brings back Soham and I am well aware of the effect that has had on the Chapman family. It has absolutely
devastated my life."
Mr Stevens, 43, said he had become close to the Chapmans over a six-week period following the murders committed by Ian Huntley in 2002, before his role in Soham was terminated after the computer charges.
His barrister Godfrey Carey QC asked him: "Your tasks included the duty of
telling them their daughter had been found dead ?"
Mr Stevens's voice broke as he replied: "Yes it did, sir."
'Abandoned' by the force
"Following my arrest I was completely abandoned by my force", said the Cambridgeshire officer
"I wasn't offered any help or support by my force and still haven't been."
He said that after he was charged with the computer offences, he sent a text message to Ms Austin, an executive case officer for the Crown Prosecution Service, in which he said he was contemplating taking his own life.
The jury heard that Mr Stevens was rated as "outstanding" and "excellent" in an assessment by his line manager in March 2001.
Prosecutors offered no evidence against Stevens on the computer charges at Snaresbrook Crown Court in August last year.
But the following month he and 32-year-old Ms Austin were charged with obstruction, accused of lying to provide an alibi for Mr Stevens for the times when the images were alleged to have been downloaded.
Officer 'had no reason to lie'
Stevens was alleged to have downloaded the images on 9 June 2002, while he was being treated for a foot injury at a police convalescence centre.
He later told police he was at Miss Austin's house, more than 100 miles away and did not have his laptop with him. She provided a statement which backed up his story.
In the witness box Mr Stevens admitted that the date he had given for his visit to Miss Austin's house was wrong, but he said he had no reason to lie because he already knew that the charges were likely to be dropped because of a report compiled by a computer expert.
He said he had been "suffering from a great deal of anxiety and confusion".
Mr Stevens said he would never ask Ms Austin to lie or conspire with him.
The trial continues.