From one of my previous posts on another forum...
Option 1: Used Donor (eBay or equivalent) Engine. This is the cheapest route and bascially consists of simply replacing the engine you have with another used engine of the same type and doing a 60K service to get the car back on the road and hope for the best in the future. Future reliability is unknown and you may be right back where you are now (needing an engine replacement) in anywhere from 10K-100K miles. Obviously 10K miles would be a bummer and 100K miles would be awesome - but no one can say for sure which it will be. Since all the shop is doing is a remove/replace operation plus a service, its not super critical which shop does the work so this may give you some flexibility. $3K-$6K.
Option 2: Refreshed/Rebuilt Engine
Some shops call them "refreshed" but many of the sellers will call them "rebuilt" even though they are not really rebuilt. This path consists of taking a used engine and performing whatever minor work is required to bring it up to whatever standard is acceptable to the seller so they can sell it as being "better" than a simple used donor engine. The seller's goal is to find an engine that has an acceptable number of previous miles and then do whatever minimum work is required to acheive acceptable key engine characteristics/tolerances. Most likely this will consist of a used engine that has good compression as-is with new timing chain/guides, maybe a new water pump and/or alternator, new thermostat, and a 60K service. Again, you may be right back where you are now (needing an engine replacement) in anywhere from 10K-100K miles but you should have a little more peace of mind knowing that a few components may have been replaced or that the donor engine was from the "better" group of used donor engines. $4K-$10K with higher priced engines having fewer original miles and/or add'l components replaced and/or coming from better known shops.
3. CPO/Remanufactured Engine: What some call a cpo (lowercase) engine might also be called a remanufactured engine where the engine is rebuilt to meet the original spec's, mostly using OEM parts. This is a classic rebuilt engine. Some engines may have updates like IMS/RMS but you'll need to specifically check for this to make sure. This option should give you ~100K miles of service but the reliability is (again) completely dependent on the engine builder and the extent and quality of the updates installed to address the inherent reliability issues. Likely to have a warranty of some kind so be sure to check the warranty details. $8K-$12K. Higher priced engines have more high quality parts/updates and/or come from better known shops.
4. High End Fully Rebuilt - This is typically provided by a specialty shop and there are several to choose from. The engine is rebuilt from the ground up with lots of new parts and all upgrades. Buyer may be able to specify some build details as desired. Engine is probably better than anything coming straight out of the factory brand new. Shops that do this work are top-end and their business relies on a good repuatation. Should expect ~100K+ miles but check the warranty details. $12K-$18K (or even more). This will give you the most peace of mind (and maybe the highest performance) but it comes at a cost. Be aware that you may not get 100% of the engine cost back in resale value (remember to subtract the cost of a donor equivalent) but that really depends on the buyer. Some buyers may highly value a fully upgraded engine from a well-known engine builder and this might help support a fairly high resale price on a well-optioned and well-cared for car.
In summary, only you can decide which path is right for you and depends on how long you expect to keep the car, how much you love the car, how much money you are willing to spend, etc, etc.
Value is entirely in the eye of the buyer. Don't be ashamed to install a donor engine to keep your daily driver running so you can get back and forth to work if you don't happen to have $10K+ available or if its not worth the investment to you. On the same note, realize that your donor engine probably had 40K-60K miles to start and still has all of the original reliability design issues so expect an engine life and reliability that corresponds to its heritage and lifetime mileage. Some people will find this entirely acceptable and some will find it entirely unacceptable.
On the other hand, don't be ashamed to put $15K into a high end rebuild if this helps you sleep better knowing that you have what is essentally a brand new zero-miles engine that will last as long as anyone knows how to make an M96 engine last and probably has as good of performance as anyone can expect out of a stock engine. And if you do have a problem, there is likely to be someone who is still in business that will address your issues.
All of the other options are somewhere in between these two and most people end up there due to reasons of cost. Buying a used donor engine and having your local shop who is trained/experienced in M96 engines install a few of the critical upgrades should improve reliability and save some money at the same time. On the other hand, realize that its still a used engine that you're starting from.
Just my general thoughts on the subject, and as with all generalities, be sure to check out all of the details when you are actually ready to spend the money. Also different shops often will use different terms for the same thing so be sure to find out exactly what they are offering so you can compare apples-to-apples regardless of what they might call it.