It's good that you're making your apology this honest and personal. But I think you should not only send this to him, but also go to him and talk to him about this face to face, preferably at a time when he is free, cool headed and would likely better see where you're coming from. This way he understands that you're really sorry. However the chances of you redoing doing your exam is pretty small, so if you send this apology prepare to get a dq and not get a resit for that exam. BUT you will gain your teacher's respect and by the sound of your apology I think you would be fine with that