You don't feel hopeless about trivial things, do you? No one says, "Life is hopeless because there's a puddle of water on the sidewalk." You are telling yourself that the thing that won't change is essential: "I can't live without it." Why not? You lived before you had it. If the relationship or job really turned out to be hopeless, weren't you living a life before it? Start living again...like you did before.
Next: Appreciate the present