He then tried to sell the artwork off to a couple at a bus stop for £5.
Michael Buchanan, 47, of Green Road, Upper Stratton, had been rushed to hospital after taking an overdose.
Medical staff battled to save his life.
But when Buchanan realised the attempt to kill himself had been thwarted, he ripped the drip out of his arm, got out of his bed and left the hospital in a rage - with a stolen painting under his arm.
Buchanan admitted stealing the £700 painting from the hospital at Swindon Magistrates' Court.
He also admitted stealing clothes from Dorothy Perkins the day after being released from prison early for good behaviour.
And he admitted breaching a supervision order, which was placed on him so he could leave jail early.
Nicola Jennings, prosecuting, told the court Buchanan took the painting in a rage as he left the hospital because he did not want to be saved.
"He had been taken into hospital after taking an overdose.
"He was really annoyed with the hospital for saving him.
"He said he was angry at them for not letting him curl up and die."
The court heard that Buchanan then tried to sell the £700 picture to a couple he met at a bus stop for £5.
Rob Ross, defending Buchanan, said his client was an alcoholic and had a long history of appearing before the courts but said he was cleaning himself up and seemed healthier than he had in 10 years.
"He says this is the first time in as long as he can remember that he can go without the need for a drink," said Mr Ross.
"He knows he can expect nothing other than a custodial sentence and hopefully this will give him the chance to stay dry for good."
District judge Simon Cooper said: "These matters are so serious a custodial sentence must be passed because of the length, persistency and frequency of your offending."
Buchanan will have to serve the remainder of his previous jail term, until September 25.
He was then given 16 weeks behind bars for each of the thefts and eight weeks in custody for failing to surrender, which will run concurrently.