He would probably try to figure out what went wrong. Harry is a curious and determined character. He might start to recall recent events to see if there were any signs of his friends' discontent. He could also try to reach out to them, either directly or through mutual acquaintances, to ask for an explanation.
He might initially be confused. Harry could keep trying to engage with his friends as usual, not really understanding why they are being cold towards him.
He might be very sad at first. Harry has always valued his friends, so being forgotten by them would be a huge blow.
At first, Harry would be in disbelief. He would think it was some sort of joke or misunderstanding. But as the reality sets in, he would become a bit of a loner. He'd still have his sense of right and wrong, so he might continue to fight against the dark forces on his own, all the while hoping that his friends would come to their senses and realize they made a huge mistake in betraying him.
He might be extremely hurt. Harry could go into a state of shock and disbelief at first. He may isolate himself, not wanting to trust anyone else for a while.
He might turn to his studies more intensively. Since he has no friends to distract him, he could pour all his energy into learning new spells and magic, becoming more powerful in the process.
Harry can focus on self - improvement. He can pour his energy into his studies, become an expert in different branches of magic. This would not only boost his confidence but also make him more independent. For instance, if he masters advanced potions making, he'll feel a sense of accomplishment on his own.
He might initially be in shock and disbelief. Naruto has always valued his friends highly, so it would be a huge blow to him. He could try to reason with them at first, asking them why they are doing this.
If his friends continue to ignore him, Harry could become sad and withdrawn himself. He might start to isolate more, spending time alone in places like the Forbidden Forest or an empty classroom. He might also lose his confidence in himself, thinking that he is not worthy of their friendship. In his loneliness, he could focus more on his studies or some solitary magical pursuits, trying to distract himself from the pain of being ignored.
Harry might be deeply hurt. He may initially be in denial, not believing that Severus is rejecting him. After all, he may have felt a strong connection. So, he could try to reach out to Severus multiple times, hoping to change his mind.
Harry could be initially shocked and hurt. After all, having your potential mate reject you is a very painful experience. He might start to question himself and wonder what he did wrong. Then, he could become angry. Given his Gryffindor nature, he might confront Draco about the rejection and demand an explanation.