I believe there is a right answer. Assuming that you know for a fact that harming a single (or few) innocents will save thousands or even millions of lives, the only right choice is to make the sacrifice.I used to agree with you Blue, but have since lost my conviction. It just seems that condemning someone who has committed no wrong because they were unlucky enough to be the wrong person at the wrong time is just...wrong. As far as I'm concerned, this question has all wrong answers. Damned if you do, damned if you don't, damned if you can't decide. I wouldn't be able to live with myself no matter what choice I made.
You say that you would feel guilt at having been the cause of the harm to an innocent life, however, in the this type of scenario, your choice not to act would cause the deaths and sufferings of many, many more; you'd still feel guilt, maybe more so. Since people will suffer no matter what you do, the only right decision is to minimize the suffering by taking the path where the fewest people are harmed. If you are concerned that you would feel responsible and "wouldn't be able to live with" yourself, you can consider the guilt and suffering you will incur as part of the sacrifice you are making; if you let your guilt hold you back, you are essentially saying that your peace of mind is more important than the lives of millions.
Finally, the whole guilt premise is a misguided way of looking at the decision. In reality, the person making the choice is NOT responsible for the outcome. The terrorist (in the OP's example) is the one who is responsible. By his acts of terror, he started a chain of events that could only end with pain and suffering. You (or the decision maker in the scenario) have not caused anyone to be hurt. All you can do is reduce the suffering by deflecting it from the very many to the very few. You should feel good about having saved thousands of lives if you make the sacrifice. The lesser pain that is inflicted was caused by the terrorist and not you.
All of the above only applies if there are really only two choices (hurt a few or let countless more die). The reality is that most scenarios would have other options. It may involve paying a ransom or conceding a political or strategic advantage. In those cases, it may be appropriate to look for other ways to stop the killing. However, if the choice ever is as simple as the one in the OP's scenario, the answer is simple as well.