The 30-year-old joined Madrid from AC Milan in 2009, but has struggled to hit the heights of his form in Italy.
"I never lost the hope of coming back and experiencing what I am now. This is a personal resurgence that I have achieved gradually through a lot of hard work," the midfielder told Marca.
"I'm trying to make the most of every match, enjoy it and do a job for the team. I know that I have to take every opportunity I get to win back my place in the football world.
"I think I've been improving and flourishing over the last few days and there's more to come. I'm in great form, I feel great physically and now I have the chance to ride that wave."
Brazil face Japan in a friendly encounter on Tuesday.