A maths tutor drank a bottle of wine before crashing his car in a ditch.

Dylan Keeton had been in the midst of a mental health crisis when he drove his Toyota Rav 4 to a layby in Corston on March 2 and drank a carton of white wine.

Swindon Magistrates’ Court heard he had planned to take his own life.

It was unclear why his car had ended up in a ditch by the layby with him in the drivers’ seat.

Prosecutor Keith Ballinger said two passers-by who saw the car had stopped to check on the man, who was still sitting behind the wheel.

Keeton admitted he had been drinking, telling the good Samaritans: “I know it’s wrong I’m going to take this on the chin.”

When police arrived at the scene Keeton said he had drunk a bottle of wine the night before, had another bottle that morning then drank from a litre plastic carton of white wine after he’d toppled into the ditch.

He was arrested on suspicion of drink driving and taken back to the police station, where he blew 106mcg on the intoxilyser – three times the legal limit of 35mcg.

Keeton, of Bremilham Road, Malmesbury, admitted drink driving. Magistrates banned him from the roads for 23 months, fined him £923 and ordered him to pay £170 in costs and surcharge.

Gordon Hotson, defending, said his client had been a man of previous good character, with no cautions or convictions.

The 54-year-old maths and physics tutor had suffered a long history of mental health issues, stemming from a difficult upbringing. He had been having therapy and his mood was improving, but things began to deteriorate and he became increasingly depressed. He turned to alcohol.

“On the day of his arrest things reached the point where he was so tired, so depressed, so utterly fed up with everything he decided that’s it, he had to end his life,” Mr Hotson said.

Since his arrest he had stopped drinking, had no long drives and was receiving a different form of therapy, which appeared to be working. He had returned to university.

Mr Hotson said his client was extremely sorry for his actions. “This is something I hope you will accept is utterly out of character. It was an incident that occurred as a result of him hitting literally rock bottom. He couldn’t go on.

“He says the guilt and shame is massive for what he has done.That clearly is very genuine.”