A man was spotted floating in the sea hours after being discharged from a hospital.
The body of Paul Bartlett, 56, was recovered off Bridlington's South Pier by the RNLI inshore lifeboat on January 31 this year.
The inquest heard that Mr Bartlett, who had learning difficulties, had gone to school in Hull, and had worked at the disabled workshop at Beeline Industries on Beverley Road in the city, which closed five years ago.
He was living in Bridlington with his husband of five years Ian Hetherington, who described him as happy-go-lucky, but prone to mood swings.
He suffered from Type 2 diabetes and depression and had self-harmed previously.
In 2014 at a time when he was struggling with mental health problems, he had been rescued from the sea in Scarborough in the middle of the night, saying afterwards it was “too hot.”
Two days before the tragedy he saw a nurse who advised him to cut out sweets and puddings, which upset him.
In a statement read to the court Mr Hetherington said: "Being told this was like an alcoholic being told they could no longer drink alcohol. Paul loved his sweet food.
"To the best of my knowledge he stuck to the advice."
On the night of January 30, they and another man staying at their flat on South Street played darts and Mr Bartlett was in good spirits, enjoying himself.
But Mr Hetherington later found him in the kitchen with a sharp knife slashing at his wrist.
Police and an ambulance were called and he was taken to Scarborough Hospital, telling a technician who accompanied him, he felt "incredibly down" and wanted to end his life. But he was released around 2.20am after telling a member of the mental health crisis team he did not intend harming himself.
He came home in a taxi, but in the morning said he was going out for a walk.
Around 7.15am three fishermen who had been fishing off the pier raised the alarm.
The inshore lifeboat recovered Mr Bartlett and made the first of prolonged efforts to resuscitate him.
Area coroner for Hull and the East Riding Rosemary Baxter recorded an open verdict, saying a tragic accident could not be ruled out.
She said Mr Bartlett could have taken too many anti-depressants, which would have affected his cognitive abilities.