In my book the resonance structures drawn for oxepin include the lone pair electrons of oxygen. If we include the lone pair electrons the total number of π electrons become 8, so it should not be aromatic. Can we even use Hückel's rule everywhere? Where should we not use it? When should we consider lone pair electrons of heteroatom and when should we not?
Oxepin is certainly not aromatic. If it were flat and the oxygen atom was sp2 hybridized, then it would be an 8π-electron anti-aromatic system, but to avoid being anti-aromatic, it exists in a boat-like conformation, with incomplete conjugation of the π-system. Interestingly, in solution, oxepin is in equilibrium with benzene oxide - the two interconvert via electrocyclic reactions.
In terms of the broader questions about Hückel's rule - it's important to look at whether the system is cyclic, planar and has (or could have) good overlap of p-orbitals on each atom within the ring. The 4n+2 π electron part of the rule is only relevant if these prior requirements are met.
In terms of heteroatoms, they can "choose" to be hybridized in such a way that a lone pair in a p-orbital overlaps with the rest of the π-system and leads to aromaticity, eg. furan, or to be hybridized in such a way as to avoid or minimize overlap, eg. oxepin. If geometrical constraints mean that a heteroatom's lone pairs can't overlap effectively with the rest of the π-system, then that breaks the conjugation and the 4n+2 π-electron rule is not relevant.
- Vogel, E.; Günther, H. Benzene Oxide-Oxepin Valence Tautomerism. Angew. Chem. Int. Ed. 1967, 6 (5), 385–401. DOI: 10.1002/anie.196703851.