Force Repair/Unmount External Hard Drive?
You can use the device id as well as the mount path for diskutil. Get the device id using diskutil list (disk3 in my example) and then force unmount it:

diskutil unmountDisk force disk3


And then erase the disk (HFS+ with GUID Partitioning Table):

diskutil eraseDisk HFS+ Untitled GPT disk3