Real Madrid lost 3-2 to Malaga on Saturday to fall 16 points behind champions Barcelona in La Liga.
Pepe said: “We knew how important this match was, we worked hard and faced up to the challenge.
“We played much better. Malaga, in the second half, had the chances and converted them into goals. We tried hard to get the win but they were fortunate to leave here with the win and score three goals. The dressing room is on a bit of a downer, we really wanted to win this game.
“La Liga is even more difficult now but if we do get the opportunity to catch up … we have to work as hard as we did in this match.”