It depends. If you have an engine failure and you think there may be internal mechanical damage (follow the QRH), you probably want to land before you tear up the engine anymore or worse, create an imbalance that causes destructive vibration. Further, it's likely you won't have the fuel to make it to the final destination due to the drag of the inop engine and the requirement to fly lower altitudes. While you probably won't make destination, you can get the company to pick out a convenient airport where maintenance and parts are available, not to mention a good long layover hotel with a beach and pretty girls.