Sure, I'll share my perspective based on my faith as a Muslim.
In Islam, we believe that all events are predestined by God. However, the causes leading to these events can vary and may be considered "good" or "bad." Within these causes lies our freedom of choice. God has planned what will happen and how it will occur, but He has given us the ability to choose how we make things happen. For example, if it's destined that you will earn a thousand dollars tomorrow, this will happen regardless. You can choose to earn it through honest work and receive a reward, or through theft and incur a sin. The difference lies in the moral value of your choice.
This belief helps Muslims manage fear and guilt, which are often associated with OCD. Since everything is preordained, there is no need to fear making choices because if something is meant to happen, it will happen regardless of our decisions. Similarly, regarding past events, there is nothing we could have done differently to prevent them from occurring. Therefore, there is no reason to feel grief or guilt.
We are only responsible for our choices in the present moment. There is no need for fear or grief. If we make a "bad" choice, we can repent and try to rectify any harm caused, trusting in God's infinite forgiveness.
Regarding thoughts, they can originate from either your soul or from Shaitan (Satan, the evil one). If a thought is constructive and leads you toward doing "good," it is from you, guided by God. Conversely, if it is "bad," it is likely from Shaitan trying to mislead you.
With this understanding, if a thought causes distress and is accompanied by "fear" or "grief," it contradicts the fundamental principle of submitting to God's preordained will and His planned events.
I hope this answers most, if not all, of your questions.