I spoke up and I regret it.
Did you say something in particular that you regret?
I told one of my teachers that I wish they were dead.
You're right. That is a little harsh to say. I am glad you are realizing that what you said was hurtful.
I was joking and I'd never kill my teachers.
While you were obviously joking, it's good that you realized your actions were wrong and could have genuinely hurt your teacher's feelings. Being able to look at past behavior and make changes moving forward is a good thing.