I bought a MKVI Golf in '12 to replace my '02 MKIV Jetta Wagon. Two and one half years later (before Dieselgate) I sold the Golf with 28K miles on it. I'm still driving the Wagon. Why? Because I prefer the MKIV.
BUT...I bought my MKIV new. And I've taken very, very good care of it, far beyond what most owners would do. As a result it's dead reliable and still a pleasure to drive, despite having 360K miles on it. Buying an unknown, 16 year old car, you may not (probably will not) have the same experience. A co-worker recently bought an '03 Jetta that had the same (local) owner for 12 years and the car was exceptionally well cared for. Nevertheless it's needed shocks, rear axle bushings, rear brakes, the turn signal stalk, and a thermostat since purchase a few months ago. And before purchase it had a timing belt service and a clutch replacement.
I also have a selection of excellent gurus nearby to keep my car in top shape. You don't. There are next to no TDI mechanics in SoCal. My daughter lives in San Diego and I'd love to have her drive a TDI, but I can't recommend it because of the lack of TDI gurus.
If you have your MKVI fixed you'll have a long, long time before you have to worry about emissions systems repairs out of warranty. And it's likely that before that happens you'll want to move on to something else. My advice would be to keep it.