The troubling thoughts that we blame on the “devil” or our “inner demons” is actually our own mind telling us things that aren’t true. The reason we have that conflict within us is because there’s a knowledge gap. If you had absolute knowledge — if you knew absolutely everything (which isn’t possible) there would be no inner conflict.
Our inner conflict is a search for what’s true, in a mind that doesn’t have all the facts. Our imperfect mind, living in a problem-solving environment (Earth) creates imperfect behavior. We attribute that existential problem to negative spiritual forces for the same reason — we don’t know any better. It’s possible that evil entities exist, but at this point in my life I doubt it.
The best way to deal with your demons is to be radically honest with yourself and with God about your weaknesses, be a continuous learner, and give yourself boundaries.