I've had a ton of pain for a few months (chronic?). It didn't affect my mental state, as far as I know. It did however hurt.
(Although personally I think while mental health is a large component of chronic pain management I'd say the pain management itself is still the primary issue at hand)