My nearly-5 DS has a worrying habit of talking about hurting himself when we tell him off. Not every time, but every so often, if he knows he's done something wrong.
For example, the other day he threw something at a smaller child and I told him to say sorry. He eventually did but then he disappeared only to come back and ask "what was hard enough to hurt someone" because he wanted to hurt himself because he'd been naughty.
He doesn't actually hurt himself - he'll tap himself on the arm and then say "no, that didn't do it" and then go and tap his head (very gently) against the wall. And he doesn't do it if he doesn't think he deserves telling off.
We've never used any form of corporal punishment, and he hasn't been exposed to any violence or other trauma beyond Octonauts and primary school. He's not generally a violent boy towards other children, quite the opposite (he threw clothes at this child, nothing hard). After this latest incident I asked why he wanted to hurt himself and he said it was so that he wouldn't do it again (be naughty).
He first started doing this about six months ago, and since then maybe four or five times, and we've tried ignoring it on the basis that it was probably attention-seeking, and tried explaining that he just needs to say sorry, and be kind. It feels like it's a way of coping with feelings of guilt. And the fact that he comes and talks to us about hurting himself rather than actually doing it suggests to me he is looking for a response from us. Any ideas how we should be dealing with this?