Harry is usually completely devastated. He might go into a state of shock at first, unable to believe that Hermione is gone. Then he could be filled with anger, either at himself for not being able to protect her or at the situation that led to her death.
Harry could initially be in shock. He's always counted on Hermione, so her abandonment would be a huge blow. He might feel a sense of betrayal and confusion.
He could get angry at Hermione for not believing in him. Maybe he would storm off and then later try to prove his innocence by showing her his study methods or the source of his newfound knowledge. He might also feel betrayed since Hermione is one of his closest friends and her accusation is a serious one.
He could be initially confused. Harry might not understand why Hermione is suddenly pushing him away. He might try to talk to her to find out the reason, but if Hermione is determined, he could be left feeling hurt and a bit lost.
Often, Harry will offer her a handkerchief or a tissue if there is one available. He might also put his arm around her in a comforting gesture. In 'The Common Room Crisis' fanfic, he does just that and then stays with her, listening intently as she pours out her feelings. He is patient and understanding, which is in line with his character in the original books. He tries to make her laugh or at least smile by sharing a joke or a funny memory. This shows his deep friendship and care for Hermione.
At first, Harry could be heartbroken. He would wonder what he did wrong to make them leave. He might try to find them and reason with them. However, if he can't reach them, he would likely turn that pain into a driving force. He would focus on his goals, like fighting against Voldemort or protecting the wizarding world, even more fiercely, because he now has to prove himself not only to the world but also to his former friends.
She could get angry. Hermione, being the strong - willed character she is, might feel betrayed that Harry is leaving. She might yell at him, asking him why he's doing this and how he could leave her after all they've been through together. Her anger is really a mask for her deep sadness and fear of losing him.
She might be initially confused. Hermione is a logical person, and without an obvious reason for Harry's silence, she would be at a loss. She would probably try to think back on their recent interactions to figure out what went wrong.
Perhaps she tries to find them right away. Using her intelligence and resourcefulness, she starts to search for any clues as to where they might have gone. She could ask other friends, like Neville or Luna, if they have seen Harry and Ron. And she might be determined to bring them back, not willing to give up on their friendship easily.
At first, Harry would probably be in shock. He has always considered Hermione one of his closest friends, so her betrayal would be a huge blow. He might not believe it at first and try to reason with her.
Harry might react with shock. If he overhears something unexpected like Ron and Hermione confessing their love for each other, it would be a big surprise. He might stand there frozen for a moment, not knowing how to process it.