Reece Theison embarked on his all-day stand-off with the police only weeks after being thrown out of his Hucknall home by his mother, Nottingham Crown Court heard.
The revelation was made as Theison was sentenced to five years in jail.
During sentencing His Honour Judge Stuart Rafferty described the case as sad and difficult.
“In the month leading up to this incident, you became increasingly depressed,” the judge told Theison.
“You lived your life in such a way that could only make things worse. You even tried to kill yourself by jumping off your bike into an oncoming car.
“This is a sad and difficult case. You are a disturbed young man, and some of the disturbance is not of your own making.
“You have certain compulsions that cause you grave difficulties in day-to-day living.
“You have sought to escape these compulsions through drink and drugs, which have aggravated the condition, rather than help.
“But on this day, you knew precisely what you were doing. These weren’t rash acts by someone whose mind was disturbed. What you set out to do was quite deliberate.”
The judge handed out the five-year sentence after reading a lengthy 25-page report, compiled by a psychiatrist, who knew of Theison before the armed siege.
Theison will serve five months of the sentence in a young offenders’ institution, before being moved to prison at the age of 21.
“I hope you get treatment that causes a grave change in you,” the judge continued. “If not, I fear for the future.
“Unless you are willing to receive treatment, you will remain a signficant risk of harm tio yourself and other people.”
James Beck (defending) spoke of the need to support Theison when he is released.
Mr Beck also pointed out that he had no intention to keep the two female members of staff at the club hostage.
“He intended to commit ‘sucide by cop’ but he didn’t think the implications through,” said Mr Beck.
“Innocent bystanders got swept up in the event, which had a traumatic impact on them.
“When the officers arrived in the afternoon, it surprised him.
“His intention was to cause some sort of episode, but there were no verbal threats to the officers.
“Had they shot him dead, it would have been part of the collateral damage.
“As it happened, the officers proceeded carefully and with caution.”
The court heard that Theison had “a number of previous convictions”, dating back to 2008 when, as a 14-year-old boy, he was arrested for possessing an offensive weapon on school premises.
In 2010, he was convicted of a robbery in the street when he pulled his victim to the ground by the neck and made off with Christmas presents.
There followed a conviction for assaulting a police officer and drugs offences.
Theison was also guilty of an attempted robbery at the Talk Of The Town social club at Hucknall Town Football Club when he tried to grab the contents of the till behind the bar.