How do I completely delete all history and data from Samsung Galaxy tablet?
Just goto your dial pad and enter *2767*3855# 
your device will then reset itself and erase all your personal informations and settings. 

This page will help you to do factory restore your Samsumg Galaxy Tab through Main menu as well as Hard key reset. 

http://galaxytablettalk.com/galaxy-tab-tutorials/how-to-reset-samsung-galaxy-tab-to-factory-settings