I think Leo covered those pretty much already with his episodes on survival and fear.
Pain is a signal that helps form/identity to maintain itself, e.g. when the body gets destroyed or wounded, pain is a signaling mechanism.
However, pain is not equal to suffering, as one can see with masochism, where one might thoroughly enjoy pain, because one is not resisting to it.
Hence suffering is the result of: pain (signal that form/identity is dissolving) + resistance to that process.