A Leamington man accused of murder suffered from depression, Warwick Crown Court heard on Thursday.
Dr Tom Clark from Solihull and Birmingham Mental Health Trust told how William Daniel Connolly, 45, suffered from bouts of depression which caused him to stop socialising, feel worthless and lose all enthusiasm for life.
During the assessment Mr Connolly, who is accused of murdering Michael Spicer on September 20 last year, talked to Dr Clark about all aspects of his life including the day of the incident.
Dr Clark, who is a psychiatrist, explained the defendant was in low spirits when he interviewed him at Blakenhurst prison.
Notes from the defendant's GP in 2002 show that Mr Connolly had been experiencing symptoms of depression including loss of libido and tiredness since 2002 and was prescribed anti-depressants the following year.
Recalling his visit to the defendant in prison, Dr Clarke said: "His mood was clearly low and he was tearful at times throughout the interview. It would be consistent with the conversation we were having.
He was having trouble sleeping at night.
"There were no other signs that would make me worry about other types of mental illness."
When asked whether the defendant could have been experiencing one of these episodes on the day of the incident, Dr Clark said: "Mr Connolly's history to me was that he had been coping well - on the other hand it had been going on for some time.
"There is no doubt that he was suffering from a depressive illness although he says it wasn't interfering in his day-to-day functioning."
During conversations with his GP Mr Connolly had said the on-going problems with his daughter Michelle that had caused him to feel depressed.
He told Dr Clark his phases of depression lasted for up to ten days at a time and said that when he went to the pub before the incident he was 'fuming' about the row he had with his daughter.
The defendant's grandson had problems with his feet and was being treated by a Doctor Dunn. She fought back tears as she described the level of care William Daniel Connolly, 45, gave to his grandchildren.
Dr Dunn broke down as she told the court of the difference in the children since Mr and Mrs Connolly began caring for them in December 2004.
She explained that Mr Connolly never missed an appointment and that he would read stories to distract his grandson while the doctor was treating him.
She said: "Miss Connolly would turn up once every five appointments. I had to get social services involved. Mr Connolly used to come every week for 15 weeks in a row. It was a different world."
Warwickshire County Council social worker Anna Prosser was called by the defence. She dealt with the Connolly's residency application and visited the family on seven occasions between May and July 2005.
She explained that the money the couple received to look after the children was barely enough to cover the basics and would not leave anything for spending on themselves and said of Mr Connolly's attitude to the children: "I would say it was of a very high level commitment. They were adamant they didn't want the children fostered or adopted - they wanted to bring them up within their family."
Christopher Millington, prosecuting, described the defendant as being "a man on a mission" while summing up his case on Friday and said: "We submit that a proper verdict is a verdict of murder."
Christopher Hotten told the jury that Mr Connolly is a man who has lived down his violent past. Concluding the argument for the defence, he said: "William Connolly is a good, decent man with a bad past.
The trail continues.