I've been in the same tunnel, except I didn't even see the train light. It's a terrible place to be, a very lonely, scary place. There doesn't seem to be any way out, with the possible exception of suicide.
Through the whole process with mental health workers, doctors, I thought that suicide was the only answer.
Thankfully I found my way out. I fell back in a few times, and wasn't very far away from it for a long time, but I haven't been back in the black hole.
I could never have crawled out of that hole on my own. I'm sure I'd either be there still or I'd be dead without the caring help of a number of people in the mental health system, starting with my family doctor. If I ever find myself in that place again, I'll go to the ER and tell them what's going on.
That's one thing you can do right now, or call 911 and ask for help. They will treat you well and see that you get help finding your way back to daylight. Even if you won't go for help, give yourself one day to stay alive. Tomorrow might bring a small sense of hope. Give yourself that chance.
I'm sorry you're where you are. I hope you'll do what you can to get help getting out of the tunnel.
Jim