How to define pain?
"Pain is an unpleasant sensory or emotional experience associated with actual or potential tissue damage, or described in terms of such damage."1
From this definition it is apparent that pain is not only a purely sensory experience, it also impacts emotionally.
Pain serves as a warning signal of imminent or actual damage. In this respect, pain has an important function in preventing damage to the body and if damage does occur, in restoring the body to its normal functions. However, pain may also be experienced occasionally in the absence of any tissue damage, or its intensity may not be in proportion to the original injury.
1 IASP, 1994. Part III: Pain Terms, A Current List with Definitions and Notes on Usage (pp 209-214). Classification of Chronic Pain, Second Edition, IASP Task Force on Taxonomy, edited by H. Merskey and N. Bogduk, ISAP Press, Seattle, 1994. http://www.iasp-pain.org.