Shiva upasana mantra is part of the Taittirya Aranyaka.This is the forest treaties ( part of the Vedas traditionally learnt in the forest region ) of the Yajur Veda.It occurs in the 10th Prashna,Anuvakas 16-25.It also comes as a portion in the Mahanarayana Upanishad,Yajur Veda.