There is no technical "secret" for how to do this. But there are two things that can be done to help a manager try to overcome this tendency.
First, the manager can gather a great deal of data about the future prospects for a project. If the manager can have a look at this sort of data, it might persuade him or her to just "eat" the sunk costs and abandon the project. By looking at this data, the manager will be forced to consider the implications of moving forward and cannot simply say "we've put this much money into it, we have to keep going."
Second, this is simply a matter of self-discipline. A manager must be aware of the tendency to want to consider sunk costs. The manager must then specifically fight against that tendency. A manager who is aware of the danger of considering sunk costs can be more psychologically able to resist the tendency to do so than a manager who is unaware.
Therefore, the best ways to try to fight this tendency are through gathering information and through being disciplined.