I have been through some pretty rough times in the last 5 years. Things have turned around now and I'm in a great place, but there was a time I was so hopeless, scared, stressed, that I never believed it was possible to get past it. I don't know your specific situation, but for me the first thing was being completely honest with myself (and those around me) to get a handle on what was going on, and a practical plan to fix it.
The only other thing that truly gave me hope was to look for someone who can inspire you. Maybe that sounds trite, but after hearing/reading about someone with stage 4 cancer or something else seemingly insurmountable, I realized that my problems were fixable & not truly the end of the world. Perhaps you need something to put things in perspective. At the time, I got a lot of inspiration & hope from Stephanie Nielson, a blogger who was badly burned in a plane crash, but managed to recover against the odds, come to terms with how her life had changed, and go on to live a good life.
If you are comfortable sharing more of your situation, it might help others here offer words of comfort & support.