Actually in this case evil would be doing nothing while terrorists kill possibly thousands of innocent people.
Not so. If you insist on a nakedly consequentialist calculus, the evil of committing torture is known, while the good of saving the innocent is only prospective. Not a good trade.
This is just one additional reason human beings are not capable of bringing good out of evil.