First, stretch out your arms and pretend you're Jesus, like so. If that doesn't work, start praying to him and follow the remaining steps.
This is an instructional video created by Kenton Whitman demonstrating how to rescue yourself in the event you fall through ice. Of course the easiest way to rescue yourself from falling through ice is to never fall through ice in the first place, but peers will pressure and things will happen. The first part of the video is Kenton discussing what happens to your body after falling through ice, and common misconceptions of how to rescue yourself. The actual action begins at 6:40 though, so skip there if you just want to see what you need to do, and not why you need to do it. Still, I can't help but feel that a guy who truly believes in his self-rescue technique should have set up a tripod and filmed the video himself instead of having a cameraman present.
Keep going for the video.
Thanks to Pineappler, who agrees that, alternatively, you can just let yourself freeze and wait for future generations to reanimate you once the technology exists.