A "troubled" man with a history of mental illness died when he stood in front of an empty train, an inquest was told.
William Pearce, 34, was killed instantly when he was hit by the Virgin Pendolino train heading towards Carnforth on a Lancaster bridge.
Lancaster Coroner's Court was told how Mr Pearce, of Rutland Avenue, Scotforth, had suffered from mental illness since 2004 and was admitted to Ridge Lea Hospital in September last year.
His mother Mary told the hearing that he had gradually improved and had even begun looking for a new job.
But the doctors changed his medication and William, afraid of the side effects, stopped taking it.
Mrs Pearce added: "He seemed to take a dislike to these new pills. He looked at the side effects on the Internet and he didn't want to take them any more.
"I tried to persuade him to carry on but he wouldn't."
Dr Halligan of the Intervention Service said he met Mr Pearce three weeks before his death to discuss options for changing his treatment but William was "reluctant" to continue with his medication.
He added: "A week before he stopped his medication altogether but there were no concerns that his mental state had deteriorated."
Train-driver John McCrimmon braked as the train hurtled towards Mr Pearce at 80mph, but could do nothing to prevent the collision on the bridge over Hasty Brow Road. Assistant deputy coroner Carolyn Singleton recorded a verdict of suicide.