Hi.
First off, you're not alone. I've been in this situation before and I know what it's like not knowing what to say.
All I can say is there's two different things you do. In my mind they are
(1) Immediate response - keep him distracted, take him out etc.. Keep his mind off cutting
then, when the immediate danger of
SH is over,
(2) Talk - when he's calmed down a bit, try and talk about it. Root out why he feels he needs to do it, let him know there's other options, and encourage him to talk to you at all times.
That's usually how I try and deal with it. I hope it works out for the best. As a self-harmer myself I think that if someone were to do that (above) with me, it'd help a bit.
I wish you, and your boyfriend, all the best and I sincerely hope he manages to find the strength to stop cutting