It's not 'if' but when. Accept now that you will break down.
If you're in Europe, repairs will be probably be pricey. If you're in central Asia somewhere, repairs will be much cheaper but the odds of getting some kind of Frankenstein car back are greatly increased. It'll probably run better than before.
Your first course of action when the sky falls in is to prop it up with your windscreen wiper and find a way to carry on. No defeat. No surrender. If the first mechanic claims it's impossible, drag your jalopy to a different one. Tell them what you are doing and inspire them with your travel tales. We've seen some truly mangled vehicles and some astounding recoveries - those are always the best stories. And if you're honest, good pub stories is why you've signed up to this thing.
If you're still reading, you are the pedantic sort. I can tell that 'Don't accept defeat' isn't going to suffice. Let's say, you've broken down, and you can't find a mechanic to fix it. In this hypothetical scenario, it's really important you deal with your vehicle legally and - this is so important - keep whatever proof of this transaction you get. This is important so that you can get out the country without further entanglements, but also so that the people who deal with your car have a record of how they got it. We've heard of Ralliers in the past who reckoned they were "broken down beyond repair." Some border guards took pity on them, and helped them out. Those border guards got sacked. We've heard of locals getting saddled with customs taxes after teams scarpered. We've also had teams chased by countries for ditched cars once they get back to their home turf. Just save everyone time, and keep it all above board.
Beyond that, we can't give you a guide as to how to dispose of your car legally. For one thing, this rally is unsupported. But even if we wanted to, it varies by country and then by region and even by town. You'll probably need to hit some combination of the police station, a mechanic or two and check in with the customs authorities. You must keep all the paperwork they give you to show you haven’t dumped it in a ditch and legged it. In some circumstances, you might need to involve the embassy of your nationality. Should you find yourself in this territory, you can give us a bell. We'll probably tweet about it.
Quite seriously though, it will always be cheaper to tow it to the finish line than to tangle with central asian bureaucracy and try and pay the import taxes. We say always, but we're assuming you'll be decent negotiators by this time. You could, of course, get fleeced.
Now let's stop dwelling on grim hypotheticals scenarios. Onwards.