Now this is a serious problem. Every time I try to use magic (as in tap to energies with my mind and cast a spell) I am either literally bombarded by negative thoughts (any type of thought, not necessarily related to the spell or anything) or my mind starts to "put the wrong intent on the spell", e.g. I start casting a spell that is about protection for myself and suddenly my mind, on its own, starts to project ill thoughts that disrupt the spell. The worst is that I can actually feel that I emit the thoughts through negative energy, as if my mind actively taps into it, aka it is like I am casting a spell against my will.
Also, I have a hunch that I might be haunted by some short of spirit, and some people (including from here) have told me this might be true.
What could be causing this and how can I stop it? Thank you in advance.
I agree with the idea of cleansing and banishing. If possible, try to see or locate any negative influence through something like meditation.
Always put yourself first, and in this case makes your affirmations more powerful than you might normally. Remember good outweighs because if not the world would have ended already, so use the forces of good to kick out any negative influence.