A much-loved dad-of-two took his own life by placing himself in front of a high-speed train in Clay Cross, an inquest heard.
Gregory Mallender, 50, of Danesmoor, sadly passed away on July 4, 2018.
The Rolls Royce engineer for 31 years had mental health problems and had tried to harm himself in 2017.
An inquest in Chesterfield today heard that there had been a 'regrettable' nine-week gap in Mr Mallender's mental health care in the run up to his death.
But coroner Peter Nieto told the court that he could not determine for certain whether the 'misunderstanding' had played a part in Mr Mallender's death.
Mr Nieto concluded that Mr Mallender 'undertook a deliberate act' to put himself in front of a train with the intention of taking his own life, adding: "For those reasons and that Gregory had made a self harm attempt in the year before and made comments about harming himself, my conclusion is one of suicide."
Mr Mallender's interests included playing guitar and listening to music. He was a fan of Liverpool Football Club and loved spending time with his children Kai and Maya.
Giving evidence in court, Karen Barker, of British Transport Police, said: "On 4th July 2018 at 11.23am at Clay Cross the British Transport Police received a report that a person had been struck by a train."
Ms Barker went on to say that the time between Mr Mallender appearing on the tracks and being hit by the train lasted between five and 10 seconds.
The train driver sounded the horn and came to a stop three quarters of a mile further down the railway tracks.
A search of the area took place and Mr Mallender's vehicle was found nearby.
Inside the vehicle was an imprint of a note left by Mr Mallender giving the names of his parents and their address. The original note was never found.
Ms Barker added: "What was quite obvious from the information that we obtained from Mr Mallender's mum and dad and ex-partner was that there had been several other incidents where Gregory had tried to harm himself. Some of these were quite recent."
There was mention of a relationship breakdown with his ex-partner and that Mr Mallender had been diagnosed with depression.
The court heard that in September 2017 Mr Mallender had taken an insulin overdose but then had 'second thoughts' and got back in his car and had a 'low impact' crash.
From that point Mr Mallender was involved with mental health care services at Derbyshire Healthcare NHS Foundation Trust.
Over time of working with the mental health team Mr Mallender showed signs that his mental health was improving as he was phased back into work and had started making plans for the future.
Unfortunately after he was discharged from the Radbourne Unit there was a nine-week gap in his mental health care following a 'mix up'.
Mr Mallender's sister, Gaynor Tooby, told the inquest: "I had raised concerns with my mum and dad that Gregory had slipped through the loop with the mental health services.
"The day before he died he had gone missing for 24 hours. I begged the police officer to get in touch with the mental health team but we never got a phone call and he killed himself the next day."
She added: "I am extremely concerned that that happened. We do not want it happening to anyone else."
Mr Nieto told Mr Mallender's sister Gaynor and brother Graham Mallender, who both attended the inquest, that it is 'very regrettable' that there was a 'mix-up' and said he was going to write to the mental health services at Derbyshire Healthcare NHS Foundation Trust about what happened.
Mr Mallender's cause of death was recorded as fatal injuries as a result of a collision with a train and mental health issues.
Whatever you're going through, you can call the Samaritans at any time, from any phone for free on 116 123.