Suicidal thoughts are not rare. Some studies suggest that between 5 and 10% of all people -- including «normies» -- experience suicidal thoughts pretty regularly.
Of course, there is a logic to what leads us to consider suicide. And that logic is informed strongly by what psychologists would call «cognitive distortion» -- usually «black and white thinking» / «focusing on the negative» / «emotional reasoning».
There is also good evidence, that suicidal thoughts are comforting to the person -- and may indeed be part of what keeps that person going.
I am guessing here, but I think it may be part of what allows our minds to entertain the counterfactual, and confirm that there is a way out, which may allow us to return to the harsh realities of life after that brief respite.
People have tons of wrong and radical takes on what makes a person report suicidal thoughts.