first off, nothing on you sd card will be erased by a factory wipe.
to reset, turn off your phone, then hold down the home key and power button until you see a little android and a triangle pop up, press the search key, then follow the on screen prompts (use volume keys to go up and down and select with the camera button)
once your phone os reinstalls, download appbrain from the market, use a computer and go to appbrain.com, go to my apps, in the top left corner of the page you will see "my app lists" (there will probably be more than one), select the one that has all your apps(i've created a new one and named it b/c all the ones the phone creates have the same name) once you have your list selected use appbrain on your phone to sync and reinstall your apps.
then you just have to reset all your preferences the way you like them unfortunately