Leeds Crown Court heard that Allan Wharrier, 53, put the lives of his family and neighbours at “serious risk” when he started the blaze.
Wharrier lived in a semi-detached house in Guiseley with his adult son and nephew.
On the evening of July 20 last year, he had been on the phone to his wife, who lives in the Philippines, complaining that the house was a mess.
Resident claims Leeds pub music is 'like a bad night in Benidorm’ amid plans to extend opening hours
17 pictures you'll only understand if you're from Leeds
Leeds Olympian Nicola Adams and girlfriend Ella Baig reveal baby boy's name as they talk about parenthood
Bus services refuse to go through parts of east Leeds due to ‘antisocial behaviour and vandalism’
Leeds heatwave: City braced as Met Office issues yellow thunderstorm warning
Wharrier, who suffers from osteoporosis, had drunk nearly a full bottle of wine and his son described him as being in a low mood.
His nephew later heard Wharrier shout: “You don’t care about me. All you do is go to your rooms.”
Later that evening, he sent his daughter a text message with passwords to his accounts and made references to “ending it all” and burning the house.
He then set fire to a bin bag next to the chair he was sitting on in the living room.
His son tried to put out the fire, but it had spread to Wharrier’s chair and acrid smoke began to fill the house.
The defendant’s daughter had been alerted to what was going on by Wharrier’s nephew and called the emergency services.
The cousins left the house and Wharrier locked the door behind them.
When police arrived they saw the living room light up orange. Wharrier had started another fire, this time setting a cardboard box alight.
Police had to drag him out of the house as he shouted: “I didn’t mean to harm anybody. I’d had enough.”
Firefighters eventually put out the fires and Wharrier was taken to hospital after suffering smoke inhalation.
Prosecuting, Bashir Ahmed said Wharrier’s son and nephew had been left feeling “unsafe in their own home” after the ordeal.
A neighbour in the adjacent property, who was at home at the time, said he feared for his safety and that of his family.
“Multiple lives were endangered,” Mr Ahmed added.
When interviewed by police, Wharrier accepted that his actions were “reckless and stupid”.
He said he was under “immense stress” due to his poor health and the state of the house.
He had also not seen his wife for more than two years due to the pandemic.
Mitigating for Wharrier, Eleanor Mitten said: “He is extremely remorseful and does not at all intend to repeat any of this behaviour.
“It’s against a very sad backdrop and it was essentially a cry for help.”
Wharrier, now of Station Road, Batley, pleaded guilty to an offence of arson, reckless as to whether life was endangered.
Passing her sentencing remarks, Judge Penelope Belcher said: “You set these fires in circumstances where you knew that others were in the house.
“I accept it was not a genuine desire to hurt others. But the point is the risk to others - and there was a serious risk.”
Wharrier was sentenced to three years in jail and ordered to pay a victim surcharge of £190.