1tb wd hdd icons not showin wen its on mac.. prob came wen i pull out cable of hd while its wrkin

i tried on a different com…bt still theres nothing…  i think d hdd is damaged…  wow a simple mistake i did and nw its all gone!!!  can anyone help…  nw all i want to do is format… so is there a way to reset to a factory setting… cause no icon is showing on mac and on windows a unknown folder show bt if i try to format it shows an error…  help needed… is there a solution…