When people go through something that is initially very painful, such as heartbreak or loss of a loved one, it can be hard to see past that pain to a point where things improve, even though they are likely to. It is situations like these where people may consider death an option even when ultimately it is not the best decision.
People are prone to periods of irrational pessimism, and systematically underestimate the extent to which they will change in the future.