How do I make a specific area dark?

Rather than using the world position node you could try reconstructing the world position mathematically from the depth buffer.

See: Depth to World Position - #3 by pylb