A difficult engagement is similar to a difficult problem.
The key is to break the engagement into those parts that can be handled and those parts that can be handled, and those parts that are unclear.
Every time you get part of the engagement handled correctly, it makes it more likely that the solution for other areas will become.
When the engagement is difficult, or out of control, take a step back and evaluate. Find the areas where there is a best practice or a good solution and get those areas working. From there the direction for other areas should become clearer.
Find and fix the areas you know how to fix, the other areas will fall into place.