Often I get a lot of thoughts that tell me to sacrifice something, to do some japa or do some action so it would help a situation that I am worrying about. Some times it is a thought that pops in the head that goes like 'I will do this this this...' Other times it's more like a threat, that if I don't do it something bad will happen. So I want to understand if these voices in my head, sometimes intentional and sometimes unintentional are counted as an vow to god and also what is the right method to make a vow to god.
Satapatha Brahmana verse 1 (Kanda I, adhyaya 1, brahmana 1)
He who is about to enter on the vow, touches water whilst standing between the Āhavanīya and Gārhapatya fires, with his face turned towards east. The reason why he touches water is, that man is (sacrificially) impure on account of his speaking untruth; and because by that act an internal purification (is effected),--for water is indeed (sacrificially) pure. 'After becoming sacrificially pure, I will enter on the vow,' thus (he thinks); for water is indeed purifying. 'Having become purified through the purifying one, I will enter on the vow,' thus (he thinks, and) this is the reason why he touches water.
Looking towards the (Āhavanīya), he enters on the vow, with the text 'O Agni, Lord of Vows! I will keep the vow! may I be equal to it, may I succeed in it!' For Agni is Lord of Vows to the gods, and it is to him therefore that he addresses these words. In the words, 'I will observe the vow; may I be equal to it; may I succeed in it,' there is nothing that requires explanation.
This is the right way to enter an vow to God.