Anthony Bird, 50, died in hospital after the alleged prolonged and ferocious attack in Victoria Park, in Tipton, on July 26 last year.
Defendants Steven Bennett, 38, and Suni Gill, 33, had been in the park with a female friend who told them she saw the alleged victim taking photos of a child. They then confronted Mr Bird accusing him of being a paedophile, an unsubstantiated claim.
Giving evidence on Tuesday, defence witness psychiatrist Dr Ramneesh Puri told Wolverhampton Crown Court that Gill had been diagnosed with bipolar disorder as a 16-year-old. And in 2018 he was also diagnosed with anxiety and depression associated with post traumatic stress disorder (PTSD) relating to a previously documented incident.
Dr Puri said Gill has experienced flashbacks and had been reliving the experience due to an underlying personality disorder and PTSD which had remained untreated.
He also said the unsubstantiated allegations made about Mr Bird had the effect of a "trigger" as the drama unfolded in the park off Victoria Road and that drugs and alcohol would have exacerbated the underlying features of his mental health conditions.
"I certainly believe that the impairment was more than trivial. From his own account there was clearly a link between his belief whether mistaken or otherwise that Mr Bird was a paedophile. In my opinion if he had not heard what was said about the victim, more likely than not, he would not have got involved," Dr Puri said.
"On balance of probabilities I believe he has an abnormality of mental functioning arising out of recognised medical conditions. This appears to impair his rational judgement and his ability to exercise self-control and therefore provides an explanation for his conduct," Dr Puri added.
The jury previously heard that Gill had been drinking and recalled little of what happened.
Bennett, of Bevan Road, and Gill of Shore Road, both Tipton, deny killing Mr Bird and deny causing him grievous bodily harm with intent. The trial continues.