Pain does not equal suffering. Pain in its purest form cannot be changed; it simply exists. However, suffering can be added if one doesn't accept the pain or if one is attached to something.
Consequently, suffering is a (sub)conscious choice. If you suffer, it's self-inflicted. You can end the suffering at any moment by detaching from its source, whether it's the past or expectations.
In line with this, if someone suffers based on a decision you made, it's self-inflicted on both ends. If you suffer because you feel responsible for the other person's suffering, it's your choice to suffer beyond the pain. Similarly, the other person is deciding to suffer beyond pain because they are attached to something.
Suffering beyond pain doesn't serve a useful purpose. You have the power to change it, to end it, to decide not to suffer. All suffering is self-inflicted.