It's a central tenet of our justice system that everyone is innocent until proven guilty.

Yet while it may be an integral part of our Bill of Rights, it's often a principle we sometimes either take for granted or just ignore altogether.

All of us make judgments about others all the time, based on everything from the way they dress to what car they drive or the colour of their skin. We have laws that prohibit the publication of prejudicial information before trials but that doesn't stop us forming opinions either.

Sometimes it really is impossible to separate guilt from innocence. Other times those who stand in the dock in our courts have a rap sheet as long as your arm and the chances are they almost certainly done it, m'lud.

But they're still entitled to a fair trial. That's what separates a democracy from a dictatorship. And that means even the indefensible must be defended.

There is a band of criminal lawyers in this country whose job it is to put the best possible side of a case that on the face of it looks hopeless. To mount a defence against the worst outrage, to find mitigating circumstances where there appear none, and failing everything else, to win their client the minimum sentence possible.

Not all of them mount very good defences. Questions can be raised about the quality of the defence provided to Teina Pora, the young Maori man who has rotted in prison for more than 20 years for the murder of Susan Burdett despite a prosecution case so full of holes it resembled Swiss cheese.

But some of them spend their lives fighting for people everyone else has given up on. Dunedin's Judith Ablett-Kerr QC. Auckland's Peter Williams QC. And the late Greg King.

A veteran of more than 50 murder trials at the still relatively tender age of 43, King defended some of this country's most notorious convicted killers, including Scott Watson, found guilty of murdering Ben Smart and Olivia Hope, John Barlow, convicted of the murders of Gene and Eugene Thomas after three murder trials, and Clayton Weatherston, who stabbed his former girlfriend Sophie Elliott to death in her Dunedin home in 2008.

The Weatherston trial, which King defended alongside Ablett-Kerr, gained him particular notoriety because the pair ran a provocation defence, essentially arguing that Elliott had provoked Weatherston into stabbing her 216 times.

The jury didn't buy it, the public was outraged, Elliott's family upset, and the Government abolished the defence of partial provocation shortly afterwards.

Nothing could have prepared King for the opprobrium that would be heaped upon him following his next big case, the successful defence of Ewen Macdonald, who was cleared by a jury of murdering his brother-in-law Scott Guy on his Fielding farm.

Despite some compelling circumstantial evidence against Macdonald, King turned in a masterful performance before the jury, placing enough doubt in their minds that Macdonald was the killer to have him acquitted.

Many people thought Macdonald did it, and questioned how and why King could have defended him.

Behind the scenes, it seems King was having doubts of his own.

Last week, Coroner Garry Evans released excerpts from a suicide note left by the high-flying lawyer, who took his own life just four months after the conclusion of the trial.

In the note, King spoke of being exhausted, disillusioned, depressed, and haunted by the dead from the numerous homicide cases he had been involved in.

"He says he has been genuinely torn between doing his job and his conscience, which keeps asking him ‘is this really what you want to be doing'? Coroner Evans said. "He hates himself for what he has done."

King, one of our most successful and high-profile criminal lawyers, was apparently unable to handle the double life a defence lawyer must lead - the placing aside of doubts about a person's own guilt or morality in order to provide them with the very best defence.

It's the ultimate irony for a defence lawyer, where even the fruits of victory can turn to ashes in the mouth.

But there really isn't any alternative. Everyone deserves a fair trial. And in any case, our juries have proven themselves incompetent far too often to start making any pre-conceived decisions about who deserves representation and who does not.

It's unfortunate that one of the last issues King dealt with before ending his life was a media inquiry over claims he falsified his legal aid billing hours. Some defence lawyers are known to pad their expenses, but King was not the type.

Still, the claim was made and the journalist had every right - indeed a duty - to make the inquiry. Some, including the police, have sought to insinuate that it was this media interest that pushed King over the edge of reason. That is unlikely, and both the coroner and King's own wife, Catherine Milnes-King said as much.

King was later formally cleared of any wrong-doing, but that is cold comfort for his family, the legal fraternity, or the wider public.

King's death is the highest-profile suicide in the legal profession but by no means the only one. The Law Society says depression and burnout is common among criminal lawyers in particular. Those who most need help - the high-flying household names - are seen as the least likely to admit they need help.

That's a pity, because New Zealand is not over-burdened with top legal talent. We need to encourage more good lawyers into legal aid work. Whatever you might think about the man or woman in the dock, we are a better society for treating them fairly. King's death contains some lessons for us all.