Spiritual teachers talk about this concept of outcome independence. It means that one shouldn’t be dependent on a certain outcome but should accept whatever happens.
E.g., if you expect to have a picnic the next day but instead it rains, it’s better to accept the fact, as you can’t do much to change the fact that it rains. Resisting the fact that it rains, would be close to mental illness.
However, in many situations, no matter how many times we tell ourselves to be “free” from the outcome, we still wish a certain outcome, and if we don’t get it, we’re affected by it. We might feel shitty, and that’s normal. It’s hardwired into our brains, and we can’t simply “think” it away. I.e., no matter how many times you tell yourself to be independent of the outcome, you’re still going to be very much dependent on the outcome.
Solution? Do the thing until you get the desired outcome.
I think it’s perfectly fine to be dependent on the outcome as trying to think away something pretty much hardcoded into our brains is close to impossible to do.