You don't have to give him the cold shoulder and ignore him in order to detach. Hostility isn't detachment, it's just hostility.
Refusing to do for him what he is able to do for himself and not allowing yourself to get drawn into his drama is detachment. Detachment can be kind.