Sorry, there is currently no way to preserve save data while replacing a dead battery. The best you can do is trade all of your pokémon (each of them holding items you'd like to keep) to another game before replacing the battery, then start a new game on the cartridge with the new battery and trade all of those pokémon and held items back. Just beware of obedience! Maybe you should trade Eggs that will hatch into the right species...