Run an RUU, either as exe from your computer or as a PC36IMG.zip from hboot. This will leave you stock unrooted. Or if you want to stay rooted, just flash a stock rom or restore your stock nandroid.
If you want to regain s-on, the method depends on how you rooted your phone.
Hboot 2.02 S-Off
Amon Ra recovery
More stuff that I'm too lazy to figure out and type.
MIUI 2.3.2_b1 ES (by Swiperat)
Extended Settings Mod
Tiamat 4.1.0 SBC
My wallpaper collection
If you think I can help you with something or need me to elaborate on a post then feel free to pm me. I'll try my best to help you out.
Oh, and I have a vagina. Fear me :P