Sheriff: Man threatened wife before killing deputy