Helen Robinson, whose body was found on a railway track at Langley Burrell, near Chippenham, drove there to take her own life, an inquest in Salisbury decided.

Ms Robinson, 56, of Devon-shire Place, Melksham, discharged herself from Green Lane Hospital, Devizes, just days before her death on March 7, 2012.

Her ex-partner Chris Smart, of Church Lane, Melksham, reported her missing at 8pm that day after visiting her home. Her car was not on the driveway. Ms Robinson’s body was seen by the driver of a passing train less than an hour later.

Mr Smart, managing director of a legal services company, met Ms Robinson, who had bipolar disorder, when she was working for the firm in 1986 and lived with her after she divorced her husband, Ken. He continued caring for her after they split up and visited her at Green Lane Hospital, as did her sister Margaret Carey and her husband John.

The inquest heard that Ms Robinson had attempted suicide a number of times. She was admitted to the hospital on January 13, 2012.

But on March 5 she left the hospital against the advice of Mr Smart, and Mr and Mrs Carey, and refused to take any further medication.

An assessment conducted by the hospital’s consultant psychiatrist, Dr Kumar Selvarajah, confirmed Ms Robinson had the mental capacity to make this decision and she was referred to the North Wiltshire Crisis Team Dr Selvarajah said: “There were no indications of self-harm.

“I asked at the time if she felt suicidal and she said no.

“Based on the assessment we said we cannot keep her against her wish.”

Mr Smart said he was not aware of any mental health problems at the time he met her, but as time went by her illness caused a strain on their relationship.

John Wilson, the coroner’s British Transport Police liaison officer for Wales and the South West, said the railway line was secured with fences that were bolted, but this would not have stopped a determined person from climbing over them.

The jury, which heard Ms Robinson suffered multiple fatal traumatic injuries consistent with being struck by a train, decided that she had taken her life intentionally.