bad sector in hard drive

i have a hard disk which has a lots of bad sectors at a certain drive.i am using this hard disk as a slave in my computer.i haven't installed any os on this disk.This hard disk usually hangs my computer.when i remove this disk,my computer operates smmothly.Now i wanted to install an os and use it on another computer.how can i use this hard disk for problem free operation.