This is something we can know from our own experience - if we feel down, pain may bother us more than if we are in a relatively sunny mood. Of course we may feel down because we are in pain, and this creates a vicious circle in which the pain is worse, so we feel even more down. In modern medical terminology, pain is said to have an affective component, which is the emotional distress that may attend physical pain, although where the physical component ends and the affective one begins is impossible to say.
Anyway, part of the way we treat painful conditions, especially chronic pain, is aimed at this affective component, or in traditional Chinese medical terms it is aimed at the Heart. Acupuncture treatment to calm the Spirit often has a powerful effect on chronic pain patients - it can engender a feeling of peacefulness and relaxation which they may not have known for a long time, and within which their pain is somehow lessened, becomes less of a dominating influence on their life and mind. It seems that the affective component of pain is associated with structures in the brain called the limbic system, and research suggests that acupuncture treatment does indeed affect this system(1).
1. See for example Hui K.K. et al (2000) Acupuncture modulates the limbic system and subcortical gray structures of the human brain: evidence from fMRI studies in normal subjects. Human Brain Mapping 9(1): 13-25