I'm gonna sound like Braggy McBraggart for a second but bear with me.
I don't know if I'm weird or what but I don't get slumps. Not since I sort of cracked the barrier from C to B+. Just yesterday I was shooting great and ran 3 racks, then ran 2 later, and had a couple of other nice outs. Tonight I didn't hit 'em so great and probably only ran one or two. But I know exactly why I didn't play as well today as I did the other day, and it simply boils down to how much focus and effort I felt like putting into it.
The trick, if there is one, is to be honest with yourself. Some players SWEAR they "used to" shoot better. Some say "you shoulda seen me the other day I was on fire! This isn't how I normally play." ...others say "man I am playing so bad" right after their latest missed shot. What they mostly have in common is they are BSing themselves

...If you sat down and did all the math and statistics you might find that your average playing on a 'slump' week isn't much different from a good week, and day to day you will go up and down by a certain amount all the time.
The problem is that you're comparing your 'average' game with the game you expect yourself to have, or the game you wish you had, or the game you once had on the best pool day of your life. So your normal screwups and missed shots seem worse than they really are. Unfortunately those misses happen more often than you care to admit and therefore are sort of "normal".
You gotta figure out the real reason why you might be missing easy shots or failing to get out of easy racks. It's not a 'slump', that's just a word people come up with to excuse themselves for not playing well, like it's some run of bad luck at the poker table and it'll eventually go away if you just ride it out. What you have is a lack of consistency. It's some hole in your game. It won't go away until you find the hole and patch it.
My advice is... if you are not someone who can run racks regularly, you need to get there before you even worry about slumps. Get so good at pool that you beat everyone at the local pool hall even on a bad day. How to do that? Well you won't get there reading about mental fortitude or keeping away from pool for a few weeks. Try some good instructional books and videos, and then do the drills. Once you reach a high level, see if you still feel like you are getting slumps. If you are, ask yourself if you're not making a big deal out of a couple of missed shots. Slumps are kind of like calling out sick from work. You aren't gonna call out if you refuse to admit you're sick. And you're not gonna get in a slump if you refuse to admit you're not playing well. Look at each rack as a new game and forget what happened earlier that night, unless you're proud of it and the memory is helping you play well.
If you're still truly shooting bad day after day and you know you have played better, there's probably something on your mind stealing your focus. Deal with it (either by resolving the issue or by ignoring it while at the table).