  In the framework of deformation quantization we apply the formal GNS
construction to find representations of the deformed algebras in pre-Hilbert
spaces over $\mathbb C[[\lambda]]$ and establish the notion of local operators
in these pre-Hilbert spaces. The commutant within the local operators is used
to distinguish `thermal' from `pure' representations. The computation of the
local commutant is exemplified in various situations leading to the physically
reasonable distinction between thermal representations and pure ones. Moreover,
an analogue of von Neumann's double commutant theorem is proved in the
particular situation of a GNS representation with respect to a KMS functional
and for the Schr\"odinger representation on cotangent bundles. Finally we prove
a formal version of the Tomita-Takesaki theorem.
