A federal judge in New England sentenced a man to 25 years in prison on Tuesday for mailing a fatal dose of cyanide to a suicidal British man, accusing the defendant of an “appalling moral vacuum”.

Judge John Woodcock’s ruling in US district court in Portland, Maine, came four years after Sidney Kilmartin was arrested for mailing the poison to Andrew Denton of Hull, in the UK.

Kilmartin, 56, of Windham, Maine, was found guilty in 2016 of mailing injurious articles resulting in death, and witness-tampering, in a case that frequently was delayed in court. His lawyer, Bruce Merrill, of Portland, said he would appeal both the conviction and the sentence. Kilmartin had pleaded not guilty.

Investigators charged Kilmartin with advertising and mailing a substance he said was cyanide to several suicidal people. It was really Epsom salt. But in one vital case, investigators found Kilmartin had sent the real thing to Denton, 49, after he had threatened to report the fraud – and Denton used it to kill himself.

Woodcock expressed sympathy for Kilmartin, who himself has attempted suicide in the past, once overdosing on antipsychotic medication and drinking antifreeze.

But the judge added that Kilmartin’s fraud and his role in Denton’s death represented an “appalling moral vacuum” worthy of stiff punishment.

“Not merely illegal they were perpetrated in a moral black hole,” Woodcock said. “Just an unimaginable moral black well that these actions took place in.”

Kilmartin, who wore an orange prison jumpsuit and spoke only to address the judge, faced a maximum sentence of life in prison.

Kilmartin and Denton were “kindred spirits” who were very ill and depressed, and related to each other because they were both suicidal, Merrill said on Tuesday. He said the two communicated about the most effective way to take the potassium cyanide, a lethal, colorless salt.