Complex sentence: Whilst he is exploring the house, he discovers a locked door, which, due to his state of heightened emotion, causes him some distress when he is unable to open it.
Split into simpler sentences: Whilst he is exploring the house, he discovers a locked door. Due to his emotional state, he becomes distressed when he is unable to open it.