It probably wouldn't break things, but I can't guarantee that. Certainly the cold alone shouldn't (though i'd recommend removing the battery beforehand)
Where are the ants located?
I would say that the best thing to do is disassemble the computer, remove the ants and ant debris, and be done with it, after all dead decomposing ants probably aren't the best thing to have in your computer.