my samsung galaxy s2 gt-i9100 totally formatted or wiped. how to fix it. How to install new ROM internal sd card also formatted.
external sd card also formatted. 
rooted successfully, installed CWM recovery successfully but there is a problem while installing new ROM. how to fix it.
Go to this website and follow the Odin method to install a new ROM. You should be able to put your phone in download mode/Odin mode to do the same.
Try this out to replace to a stock ROM - http://android.sc/update-samsung-galaxy-s2-i9100-to-official-ota-android-4-1-2-vjms3-jelly-bean-firmware/

You can visit this website to find some nice ROMs for the phone with reviews as well - www.galaxys2root.com