Edward de Bono of Lateral Thinking fame wrote a book named "Po: Beyond Yes and No" .
While not the most catchy title, in the book he describes the process of forming patterns in the mind as analogous to pouring warm ink over jello. After a while, channels begin to form and the ink naturally starts to flow down the channels, deepening them. It's pretty obvious that (a) knowing you are stuck in a groove takes some insight and (b) breaking out of the thought patterns can be pretty challenging.
De Bono also invented the L game. The interesting thing about this game is that it demonstrates very visually a flaw in human thinking: once you have started down a path in a decision tree and pruned off other possibilities, all your answers from that point onwards will be wrong if that path doesn't contain the right answer.
Pretty obvious, but where the flaw comes in is that, unlike computers, humans don't tend to backtrack past a point of a belief that "this is axiomatic", and never reexamine it.
I think that - and this is just IMHO - people who go on to commit suicide when there are other, obviously better solutions, are stuck deep down the wrong branch of a decision tree and incapable of reevaluating prior decisions.
Offering rational advice to people in this position is futile; what's needed is to help them pour warm ink to form new channels.
Get dozens of book recommendations delivered straight to your inbox every Thursday.