Unable to format my passport ultra external HDD in windows

I am unable to use and also format external HDD , When checked with a partition tool, it shows bad sectors.
How do I fix it?

Bad sectors could be logical or physical.

If it’s a logical issue then completely erasing the hard drive at a low level (Write zeros) should address the problem. WD Data Lifeguard Diagnostics for Windows can perform this task.

If the damaged sectors are physical then the unit will need to be replaced.