Primary guidance should come from your Non-Normal Procedures Checklist. Other factors specific to the flight may alter them somewhat...
If you're flying a single-engine airplane, shutting down the engine is a last-resort procedure. OTOH, in a 747-400 a single engine shutdown is not necessarily even a reportable emergency. Further, your experience and knowledge of specific engine characteristics may help the decision process.