Naruto didn't know if all these years he was lying to himself or just too stupid to realize.
All the time spent on chasing Sasuke he was calling him his "best friend", "soulmate", "brother", even. All this time he believed the feelings he had for Sakura were romantic love. That's why when the truth hit him it hurt more than it should.
Over the years he and Sakura have grown closer, spending nearly all the time together. Building their relationship on the need to bring Sasuke to Konoha. Something told him that he would even give up on her if Sasuke loved her back. He believed all his dreams would come true if only him and Sasuke could be friends again.
A lot of stuff happened on the way. Sasuke tried to kill Sakura and Naruto even started to hate him. Is it possible to hate a friend? Could Naruto call himself Sasuke's friend anymore? He wasn't sure of it. But he wasn't the type to give up halfway.
Sakura forgave Sasuke for trying to kill her. Because she loved him. And Naruto found himself forgiving Sasuke too. That's when it hit him harder than a punch.
Of course, he was closest to Sakura. They knew everything about each other. They would probably die for each other, too. That's how their friendship was.
But still wanting to get back someone who would kill you if he could wasn't just friendship and suddenly it was all painfully obvious. It wasn't Sakura who Naruto loved to death. It was Sasuke all along.
He saw him again and it hurt even more because his long-lasting, newly-discovered love was made to be unrequited forever. No one could know about Naruto's feelings. Normally hew ould share everything with Sakura but this time it was, obviously, impossible.
He knew from the beginning that in the end he would have to give someone up. He was just mistaken about who would it be.
But after all Sasuke didn't care for neither him nor Sakura. They both knew that Sasuke would only hurt them. They both didn't care.
But even when he knew Sasuke will only hurt Sakura he couldn't help but wish to be her. He would accept being hurt by him, he just wanted his existence acknowledged. Because Sasuke was at least pretending to care about Sakura. And Naruto, despite being loved and respected by everyone as a war hero, was lonely - and utterly heartbroken.
All he had left was lying to himself that his love never happened. Pretending he was happy having Sasuke back as a friend. Pretending to be able to love someone who wasn't Sasuke.
Reassuring Sakura that Sasuke loves her despite not being able to show it. And knowing it's a lie because Sasuke is incapable to feel something as complex as love. He hoped at least Sakura can be happy if he can't. But when he saw her crying that one time.he knew that they're both left scarred by the man they loved who would never be able to return their feelings.
But the world shouldn't know. So they just pretended they are happy until they almost believed it themselves.