We propose a micromachined vertical cavity resonator enabling temperature insensitive operation for surface emitting lasers or optical add/drop filters. The strain-induced displacement from differential thermal expansion is used to compensate the wavelength shift caused by temperature variation. Also, a wavelength-trimming technology using the same principle with precise strain control is suggested. The possibility of a drastic reduction in the temperature sensitivity of wavelengths, as well as precise wavelength adjustment, is presented. We fabricated a micromachined vertical cavity filter with a GaAlAs/GaAs multilayer reflector, which is mechanically tuned by differential thermal expansion. We observed a large negative temperature coefficient of the resonant wavelength. It is demonstrated that its temperature dependence can be widely controlled by the proposed concept. The possibility of temperature-insensitive operation is discussed.