I'm wondering if promises that randomly pop up in your head are considered valid. Are you required to keep the promises, even though they're just thoughts? I have OCD, and get these thoughts constantly. They cause me a deal of anxiety. Also, in order to treat the OCD, am I allowed to purposefully think or say a promise and avoid keeping it? This is in order to lower the anxiety associated with the pop up thoughts. Will God see this as sinning, regardless of the reason as to why I'm doing it?
"Or if a person swears, speaking thoughtlessly with his lips to do evil or to do good, whatever it is that a man may pronounce by an oath, and he is unaware of it - when he realizes it, then he shall be guilty in any of these matters. And it shall be, when he is guilty in any of these matters, that he shall confess that he has sinned in that thing" (Leviticus 5:4-5).
A common mistakes is to assume that any promise must be done. But what if a person promises to commit a sin? Such a promise cannot be kept because you cannot do evil in order to do good. "And why not say, "Let us do evil that good may come"? --as we are slanderously reported and as some affirm that we say. Their condemnation is just" (Romans 3:8).
Careless or thoughtless oaths are sinful. Promises are important, so they must be well thought out. In the Old Law, a thoughtless promise was treated as a sin, but you do not see a requirement that they must be kept.
But I want you to notice something else: promises are given to someone else, they are spoken. A random thought is not a promise. To think about making a promise is not the same as making a promise. To comment on a thought by saying it out loud is not the same as an actual promise.