After winning his seventh Wimbledon title with an emphatic four-set victory over Andy Murray on Sunday, Federer said he been delighted with his form over the past year despite suffering some painful losses.
"I played an amazing French Open last year," the Swiss told a news conference. "I was very close against Rafa (Nadal) in the final. And I did play actually very well here as well against Jo (Wilfried Tsonga). Things just didn't turn out well for me."
Federer was knocked out of Wimbledon in the quarter-finals last year by Tsonga after going two sets up in their quarter-final and he held a match point against Novak Djokovic in the US Open semi-finals before suffering a painful defeat.
"I did play great as well at the US Open," he said.
"Again, unlucky. Djokovic played well, whatever you want to call it. But things were tough for me there."
Federer, whose last Grand Slam triumph was the 2010 Australian Open, said he always believed things would turn around for him if he continued to work hard despite Nadal and Djokovic's dominance at the majors.
"I played a lot of tennis, good tennis, but I wanted to win titles, not just lose in quarters and semis," he said.
"Then the confidence rose as I went to Paris and also to London. This is when I realised a lot is possible in 2012."
Federer said his life had changed enormously since the birth of his twin daughters in 2009.
"People forget sometimes I do have twin girls," he said.
"That has had a massive impact on my life. I think it's helped my game more than anything because I think I'm playing some of the best tennis of my life right now.
"But just to be able to juggle everything together has been a challenge. And I think you learn from mistakes. You try to make it work for everyone involved. Hasn't always been easy, I admit that."
The twins and Federer's wife Mirka were on Centre Court to watch him dash Murray's hopes of winning his first Grand Slam title and become the first British man to win the Wimbledon crown for 76 years.
"The victory today is a dream come true today for me and my family, seeing them there," said Federer who will also return to the top of the world rankings. "It's big.
"At Wimbledon I think he (Murray) handles it so perfectly to be quite honest. I really do believe deep down he will win Grand Slams, not just one. I do wish him all the best. This is genuine. He works extremely hard."
Federer, 30, admitted he had not yet been able to assess the significance of his 17th Grand Slam title.
"Honestly this one hasn't quite sunk in yet for some reason," he said. "I guess I was trying to be so focused in the moment itself that when it all happened I was just so happy that it was all over and that the pressure was gone basically."
Federer said he had received support from many people including former world number one golfer Tiger Woods.
"He was very pumped up these last couple of days for me. He was very supportive," Federer said. "It's nice when other greats like this believe in me. They push me further."