Here we are not talking about physical pain. For the most part such a type is unavoidable, and we’ll do whatever we can to escape it if exposed to it. Here we mean exclusively mental, emotional, and psychological pain.
When you are in mental pain, is your body hurting? No, you aren’t being attacked, your body is functioning fine. The pain you feel comes from your mind, which regardless of whether you can control it or not, means that you are harming yourself. It is therefore possible to learn to manipulate and stop mental pain to an extent.
If you understand the above, you understand that you need not suffer when you feel lonely, when you are hurt emotionally, when you are rejected, when you are locked in prison, when you are insulted, when you get a low score at school, when you are fired from work.
No, it is absolutely not easy, and perhaps almost impossible for the vast majority of people, but understanding that it is possible is the first step towards control.
The next time you feel any kind of emotional pain, try doing introspection and lessen it. The more you practice, the better you’ll become.