Is there a name for the behavioral phenomena of when animals like ants sacrifice themselves?
The term you're looking for is altruism. According to Wikipedia, altruistic behaviour "allows an individual to increase the success of its genes by helping relatives that share those genes." Someone correct me if I am wrong but this means that this behaviour evolved by natural selection because it ensures the survival of a species in most cases. The link about exploding ants is probably a nifty example of altruism.