I went to the door, which I was surprised to find open.
この文は非制限用法で、which がthe doorの関係代名詞です

the doorは()の部分に入ります。
I went to the door, which I was surprised to find (the door) open.
the doorは to findの後ろに置かれます。

質問ですが、
最初the doorをどこに入れるかわかりませんでした。
どうやって見つけていくものなのでしょうか?