Originally, the term “Bagalāmukhī” was mentioned in the Vedas, precisely as the name of the Goddess वल्गा माता (valgā mātā, Valga Mata). Further, “va” in the Valgā name was transformed into “ba” by transposition and changing varṇa-vyatyaya letters, “la” and “ga” swapped, so the “Bagalā” term appeared . The Goddess herself is described as “the one who eliminates enemy magical actions”. She is mentioned in Kṛṣṇa Yajurveda (6.2.10) and Śukla Yajurveda (5.23-24) and described there as the Goddess Vaiśṇavī, eliminating magical effects, as well as the one by virtue of whom prāṇa is controlled.
शिरो वा एतद् यज्ञस्य यद् धविर्धानम् प्राणा उपरवाः ।
हविर्धाने खायन्ते तस्माच् छीर्षन् प्राणाः ।
अधस्तात् खायन्ते तस्माद् अधस्ताच् छीर्ष्णः प्राणाः ।
रक्षोहणो वलगहनो वैष्णवान् खनामीत्य् आह वैष्णवा हि देवतयोपरवाः ।
असुरा वै निर्यन्तो देवानाम् प्राणेषु वलगान् न्य् अखनन् तान् बाहुमात्रे ऽन्व् अविन्दन् तस्माद् बाहुमात्राः खायन्ते । इदम् अहं तं वलगं उद् वपामि ।
śiro vā etad yajñasya yad dhavirdhānam prāṇā uparavāḥ ।
havirdhāne khāyante tasmāc chīrṣan prāṇāḥ ।
adhastāt khāyante tasmād adhastāc chīrṣṇaḥ prāṇāḥ ।
rakṣohaṇo valagahano vaiṣṇavān khanāmīty āha vaiṣṇavā hi devatayoparavāḥ ।
asurā vai niryanto devānām prāṇeṣu valagān ny akhanan tān bāhumātre ‘nv avindan tasmād bāhumātrāḥ khāyante । idam ahaṃ taṃ valagaṃ ud vapāmi ।
The mention of Valgā occurs in the same context in both Taitiriya Brahmana and Śatapatha Brahmana (3.5.4). Further, she is mentioned in Atharva Veda in the form of sūktam, as “abolishing the negative magical impact”. The very term “Valgā” is translated as “harness,” like the one by which horses can be controlled. By the way, a horse is a symbol of prāṇa (the life force) in the Vedas. In the literal sense, it is about management and control. Actually, that is one of several meanings of a term “yoga”, derived from युज् (yuj), which can mean “harness” too. The earliest mention of the term (from which the yogic context can be derived) that I was able to discover with a help of Tara Michael, a French scholar, is found in the Rig Veda. The first one is the Hymns to Savitur (RV 5-81.1):
युंजते मन उत युंजते धियो विप्रा विप्रस्य बृहतो विपश्चितः। वि होत्रा दधे वयुनाविदेक इन्मही देवस्य सवितुः परिष्टुतिः ।
yuṃjate mana uta yuṃjate dhiyo viprā viprasya bṛhato vipaścitaḥ। vi hotrā dadhe vayunāvideka inmahī devasya savituḥ pariṣṭutiḥ ।
He is a priest who “harnesses” his spirit, harnesses his sublime thoughts. Only he knows all the rules of sacrifice. Sublime praise of God Savitur.
I.e. there is a hint here that the yogic state is a basis of full devotion. Which, by the way, we can find in many Purāṇic and Tantric pūjās, where such yogic elements as prāṇāyāma or bhūta-śuddhi always go first in the ritual.
Also in the Hymns to Brahmanapasthi (RV 1 – 18 6-7):
सदसस्पतिमद्भुतं प्रियमिन्द्रस्य काम्यम् । सनिं मेधामयासिषं ।
sadasaspatimadbhutaṃ priyamindrasya kāmyam । saniṃ medhāmayāsiṣaṃ |
The one, who is a dear friend of Indra, the beautiful lord of the seat, I honor for the sake of gaining intelligence.
यस्मादृते न सिध्यति यज्ञो विपश्चितश्चन ।
स घीनां योगमिन्वति ॥७॥
yasmādṛte na sidhyati yajño vipaścitaścana ।
sa ghīnāṃ yogaminvati ॥7॥
He, without whom the yajña is not complete, even if he is sincere. He subordinates thoughts through yoga.
Yoga, as a discipline of controlling prāṇa, mind, senses and a body, is examined in many texts, and in this case it is very similar in meaning to that of the Goddess Valgā or Bagalā (Bagalāmukhī). Also, for a proper sādhaka, in the first place, She is the Goddess, helping to subdue or paralyse inner enemies, such as kāma, moha, matsarya, etc. Although, of course, many worldly people, who are worshipping Bagalāmukhī, hope to subordinate external enemies instead of eliminating their internal ones. That is a form of internal obscuration. By virtue of Bagalāmukhī, controlling his prāṇa, mind and indriyas, a sādhaka gradually passes from a southern āmnāya to the upper one in a state of samyama. There he gains the experience of Bagalāmukhī in the form of light, consciousness or the Goddess Lalitā. Bagalāmukhī is related to the Śri Tradition (Śrikula), and it is no accident that She is mentioned as Vaiśṇavī in the Vedic texts. Although, in some Tantras She is also seen as Kalī of yellow color – Pīta Kalī. In any case, in the form of Kalī, She helps to overcome time limitations, since there is also a connection between time and prāṇa. If you can set your prāṇa to balance and calmness, then you will go beyond time. And it is no coincidence that Bagalāmukhī is connected with Śiva Mṛtyuñjaya – the Сonqueror of death.