Well are you trying to format the C and D hard disks from within windows? Or are you using a CD run formatting program? Cause, if you are trying to run it from within Windows, that's your problem right there, Windows keeps hanging on trying to delete its own system files. So what I would recommend is using another computer and a blank CD-R, download a software package called Hiren's Boot CD, it has an excellent formatter. Just burn the ISO file onto the CD-R using a burning program and then boot from the disk on the computer you are having BSOD's on.
Hope this helped.
~Alex