Menu -> Settings -> Security -> Factory Data Reset
Not sure how thorough this is, but I'm sure it's a start. You can also Format the SD Card by going to:
Menu -> Settings -> SD card & phone storage -> Format SD card (may have to Unmount first...)
Again, haven't actually tested the thoroughness of these, but it would probably suffice if you're returning it.