I did the same thing on Saturday.... I've had 2 iPhones, and I've NEVER reset/formatted either of mine, so I had to ask to.
In the iPhone under settings is a "reset" button...... There's two options, I can't remember what they are but one erases everything and one I believe just resets the iPhone to its original settings. It takes about 20-30 minutes, so don't wait until the last minute.
I just sold my Wifes 3G (she gets the 3GS). Go to - General>Reset>Erase All Content and Settings.
It took about 45 minutes on her 3G.
BUT, be careful I tested it after the reset by re activating it and my iTunes account was still there. so I logged out of the account then did the same reset again. Just for added security I changed my iTunes password too.
PS, If you are selling your wife's phone, Do a backup first so all of her pictures get saved, don't ask me how I know.
I believe the DFU mode restore is as good as erase all content and is quicker. It's what I've done in the past.
Everytime you upgrade the firmware it actually does this. It formats the phone and installs a new OS. (then many tend to restore from backup). That's why you have to restore from backup though, it's been formatted.
good luck, enjoy.