Zero-padding the middle of a signal
If there's a region in the middle of the sequence that you want to discard, you can't just set those samples to zero and compute the DFT, because the DFT would reflect the fact that your sequence suddenly jumps to the value zero, and then suddenly jumps back again to non-zero values. So the zero values would significantly contribute to the result of the DFT, which is almost the opposite of what you want to achieve.

What you should do is consider the two relevant parts at the beginning and at the end as two realizations of the underlying process, and compute two DFTs, which can then be averaged, just like in Bartlett's method. Of course, each sub-sequence can (and should) be windowed and zero-padded before computing the DFT.