First off I just want to say well done you for heading down the road to recovery, an eating disorder is a very hard illness to overcome so you should be proud of yourself.
I think you should pull your teacher to one side at the end of a lesson, or at lunch, or even ask him if you can have a chat with him in a private room and just say your thank you. You don't have to go into detail as from what it sounds like, he already knew what was going on. If I was you I would apologise for swearing at him and pushing him away when he wanted to help you, but don't be too hard on yourself about that because thats what an eating disorder does to you, its not you saying that, its the illness almost telling you to react like that and talk to people in that way when they try to give you help.
He would probably really appreciate the thank you and it obviously means a lot to you that he saved your life as you put it.
Good luck, and I hope I helped a little.
Let me know how it goes when/ if you do decide to do this.