Overhaul or replace?
All depends on whether you have the skills needed, the inclination, the time, space and equipment to do it yourself. It will be cheaper than any garage but major operations always take longer than anticipated - especially on an XM.
If the car is a 'keeper' and in good condition, I would do it yourself because a garage bill to investigate, remove, strip down, rebuild, refit will exceed market value of the car. Just as an example, Autodata book time to replace headgasket on the 2 litre petrol turbo XM is 10 hours. A full rebuild of engine is just over 26 hours labour assuming there's no delays caused by seized fixings and other issues. Now factor in parts, VAT and the bill will probably look like a phone number.

1995 XM 2.1 auto hatchback RP 6717. Sold on for spares or repair.
1992 Rover 216 GTi twincam 16v 130 bhp. Unbreakable mechanicals, bodywork - less so.
2015 - Still waiting for the hover conversion kit but do wear two neckties at same time.