BELGRADE, Serbia -- Novak Djokovic says playing against Spain in the Davis Cup quarterfinals could boost his form ahead of his return to competition.

Djokovic says "I haven't had too many matches recently, and that's what I need to get back in shape."

The Serb has dropped from his No. 1 ranking after a slump in form following his French Open title last year.

Djokovic's most recent match was a loss to Nick Kyrgios in the fourth round of the BNP Paribas Open in Indian Wells, California, in March. He withdrew from Miami Open because of a lingering right elbow injury.

Djokovic says he no longer feels pain in the elbow.