This question already has an answer here:
I'm in a confusing gray area where I accepted an offer at a new company and then gave my notice at my current company, but now my current employer is fighting hard to keep me. They've agreed to solve almost all the reasons I wanted to leave in the first place, and I trust their commitment and the time scale they say they can have the problems fixed in. I also have a lot of positive feelings for my current company, whereas the new company is (like any new company would be) more of an unknown. Basically, I wish I had known that my problems were solvable before I started my job search so that I could have pushed for solutions more aggressively without applying to a bunch of new jobs. (Lesson learned: it always pays to ask for what you want.)
If I want to renege on the offer I've signed, what's the best way to tell the employer without burning that bridge completely in case I ever want to work for them in the future?