Mental suffering would not occur if people did not feel that the pain was happening to them personally, rather than someone else.
But it never is happening to them, only to their internal mental construct of who they are, with which they reflexively identify.
Absent the misidentification, absent the pain.
Who we think we really are is only a figment of our imagination. A very important figment to be sure, but still only a figment. Not on the same level of reality as our liver or kidneys, for example.
Mental pain occurs from loss or absence of something important to who we feel we really are; which is only a mental construct. At such times as we are fundamentally aware that we truly are much more than only a pattern of thinking and feeling inside our minds, then we do not identify ourselves with that pattern, as useful and important as it usually is. That pattern is not the real us. We do not identify with that pattern. We are much more than that.
Absent that misidentification, mental pain that occurs to our mental construct is like reading a sad story; while reading it we empathize with the person in the story, but intensity is absent, because the person in the story is not really us. It is only a story.
All this is ancient East Asian wisdom. Most people live a healthy happy life without being aware of the slightest bit of any of this; as they should. But at such time as people fall into a long period of serious unhappiness, immense confusion, prolonged depression, intense mental pain; then the foregoing shows a way out for them, whether or not they take it. Sometimes it is enough to know that a way out might exist, for the unhappiness to lessen, because they then no longer feel hopelessly trapped.
Starting to understand some of this, some folks become afraid and instantly back off; fearing that this new awareness will interfere with their enjoyment of life as they have previously experienced it. Not to worry; human minds are resilient enough to gradually forget to take the medicine once the pain has gone away, and soon be completely at a loss as to why they ever took it. Until when next it is needed.