Every great player at one time or another goes into a hitting slump. These slumps can last anywhere from a game, to a week, to a month, to a whole season.
During these slumps, your mind starts to play tricks on you. The longer you are in the slump the more you question your ability.
The only way out of a hitting slump is to swing your way out.
Stay consistent in your training. Consistency through process builds confidence.