A head teacher hanged himself after racking up thousands of pounds of debt on internet gambling, an inquest heard.
Mr Reilly hanged himself just before lessons began
John Reilly, 39, head of Sandilands Community Primary School in Wythenshawe, became depressed after losing thousands in online casinos.
Mr Reilly left his school office shortly before lessons on 4 June and hanged himself from a tree, Manchester Coroner's Court was told.
The coroner, Nigel Meadows, recorded a verdict of suicide.
The father-of-three ignored pleas from family and friends to get professional help even after his house was repossessed.
The inquest heard that Mr Reilly was "very secretive" about his addiction.
His former girlfriend Susan Coates, 47, mother of two of his children, discovered the extent of his debts only when bailiffs called to take possession of the family home.
The couple split after Ms Coates found Mr Reilly using her credit cards to fund his gambling habit.
He later moved in with a fellow teacher at his school.
Manchester coroner Nigel Meadows said: "He was leading a Walter Mitty-type lifestyle and would not face up to the situation he was in.
"This is an illustration of how gambling in our society is as dangerous as drugs and can lead to traumatic relationships and family breakdown. This was a tragic waste of life of a very valuable member of our society.