They are all very similar. I'm in pain and I'm hurting are basically the same thing. I can't think of any examples where they are different, but someone might be able to. I'm sore is more common to use to refer to muscle or joint pain than the other two would be. It's less common for other types of pain, but is also used for when you get a bruise or impact injury. Also "my arm is sore after that flu shot" would be common.
Of the three sentences you have, "I'm hurting" would be the most common to use for emotional pain.