Since the diagnosis I've started hurting myself again

I'm 23 and I was diagnosed with thyroid cancer two months ago. I hadn't self-harmed since I was at school, but since the diagnosis I've started again. It's the only thing that makes the panic stop for a bit. I haven't told my family because they've got enough to worry about.