David Downs was more than twice above the legal drink drive limit when he was spotted by officers on Fox Hill in Scarcliffe.
Prosecutor Becky Allsop told Chesterfield Magistrates Court: “Officers found a car parked with its engine running and the male driver was asleep.
“It took some effort to wake him up - he said he had been drinking Carling about an hour ago.”
However Ms Allsop said during a police interview Downs admitted having drunk seven pints of lager.
She said: “He couldn’t remember the following events but could remember speaking to officers.
“He parked in the layby but couldn't remember physically getting in the car and driving - during his interview he said he was disgusted by his own behaviour.”
The court heard Downs committed the drink drive offence during the 12-month suspension period of an eight-week jail term for a communication offence.
John Wilford, Downs’ solicitor, said: “He had been to the public house and had consumed quite a lot of alcohol and made the unfortunate decision to drive a car.”
Mr Wilford added that Downs had only driven half-a-mile away from the pub before pulling over - while his client who suffered with anxiety and depression had attempted to take his own life in March.
Downs, of Station Road, Whitwell, admitted drink driving and breaching a suspended sentence order.
District Judge Andrew Davison told him: “You’ll appreciate that you have put yourself in a precarious position.
“Last October you were sentenced to eight weeks imprisonment suspended for 12 months - but it would be unjust to activate the suspended sentence.”
The judge noted that Downs was suffering with mental health issues which needed to be addressed.
Downs was banned from driving for 20 months, fined £400, made to pay £85 court costs and a £40 victim surcharge.
He was told the original suspended sentence would continue and three additional rehabilitation activity days would be applied.