Here’s a link to a helpful booklet on coping with suicidal thoughts: http://www.comh.ca/publications/pages/cwst/ available for free download.
It’s full of practical advice and encouragement – this will pass, the intense emotional pain will not last for ever. A plan for you to personalise if/when the thoughts recur is included.
It’s from Canada, so you may need to add your own phone contacts relevant to your country e.g. Samaritans in the UK.
Suicide is not chosen; it happens
when pain exceeds
resources for coping with pain.
And here’s another helpful link: http://www.metanoia.org/suicide/
Feeling suicidal? There is help out there – and there is hope.