When engaged in war there are times when emergency surgery is needed: Legs have to come off or deeply-buried bullets need to come out. And sometimes, there's no time for anesthesia when the Nazis are bearing down.
So, rather then stabbing a patient in the arm to distract him from the saw going through his foot, the surgeon would supposedly shove a bullet in his mouth and ask him to bite down. Of course, you could use a belt or shirt but even in the throes of death it's important for a man to look like a badass. Thus, "Bite the bullet."