I can't remember much about the movie, just that the aliens were kind of insect like and had something to do with using the humans brains for something. One key part of the movie I remember is a guy sacrificing himself to detonate an explosive to save his friends from said aliens. The humans fighting against the aliens are some kind of army.
Sounds very much like Starship Troopers. I don't recall any sort of sacrificial bomb scene, but it's possible you're thinking of the part when Denise Richards' love interest allows himself to be killed by the brain bug in order to help her figure out how to kill it. Or it could be one of the sequels; I've never seen them.