A contrary position to EmeraldCity...

If this isn't a universal parenting maxim, I'm coining it now: Parents can expect to get more of any behavior they reward. When a child fakes an injury or intentionally self-injures, they're looking to get a particular reaction from their parents. When you treat the pain as real, apply ice, etc., you are providing that reaction, and therefore rewarding the behavior. Therefore, you can expect more of it.

I have an 8yo girl (not to be confused with my DD8) in my care who fusses at homework time, and when other techniques are not working, she self-harms... usually she bangs a knee or her elbows on the table, but last night she cranked it up a notch, and threw herself off the chair and onto the tile floor. She's not injured, but she's clearly in very real pain. For her, the goal is avoidance of homework, so any reaction that involves a pause in homework is her reward. Our strategy, therefore, is to flatly (I do concur with EC about keeping the negative emotion out of it) point out that she wouldn't have hurt herself if she'd just stop fussing and get her homework done. We'd leave her at the table to self-soothe her tears, and then come back to help when she's ready to work.

Before homework was finished, she was back to her charming, cheerful self.