Chapter 17, Verse 19
Part of 17: Śhraddhā Traya Vibhāg Yog — श्रद्धात्रयविभागयोगमूढग्राहेणात्मनो यत्पीडया क्रियते तपः।परस्योत्सादनार्थं वा तत्तामसमुदाहृतम्॥
mūḍha-grāheṇātmano yat pīḍayā kriyate tapaḥ parasyotsādanārthaṁ vā tat tāmasam udāhṛitam
That austerity which is practised out of a foolish notion, with self-torture, or for the purpose of destroying another, is declared to be of the Tamasic nature.
Some burn sulphur in a pot and place it on their head. Some thrust hooks of iron into their flesh. Some hang themselves with their head downwards over fire and swallow smoke. Some stand in cold water immersed up to the neck. Some torture the body by lighting fires on the four sides (with the sun as the fifth fire -- this is known as the Panchagni Tapas). Some sit in the centre of a circle of fire. Such austerities are Tamasic. These will not help one to attain knowledge of the Self.