Very hard for me to choose. While I like both games well enough they both have issues.
Doom 3 I loved the atmosphere, in places I found it genuinely terrifying. My main issue with it is (in my humble opinion) that it over stays its welcome. I feel like the scares start running thin after a while and the gameplay isn't quite strong enough to stand on its own, it goes from being atmospheric to just becoming a chore. They could have cut out about 25% of that game and it would have been better for it. Its why despite owning a copy I still haven't played Resurrection of Evil, having played through Doom 3 several times it really doesn't leave me wanting more.
Quake 4, well, its just a bit bland really. I play through it now and again if I want something thats not to taxing. It's a "put brain in neutral, blow things up" kind of a game. To be honest I think the biggest problem with Quake 4 (apart from the vehicle sections, god they were bad) is that it was called "Quake". Had they given it a different title it probably would be remembered as a serviceable shooter instead of a disaster.
If push comes to shove I would however have to go with Doom 3 as its generally more memorable.
PS: Why is Prey not on this poll? lol