"No, it is not him."
Translation:Nej, det er ikke ham.
I think "den" is only used when you could replace the word "den" with a common gender noun, and every other time "det" is used instead. Here's an example.
Someone asks you "Har du hesten?" (Do you have the horse?)
You reply with "Jeg har den" (I have it.)
In this case you could replace "den" with "hesten" which is of course of the common gender, so "den" is used instead of "det"