In many such fanfictions, Dumbledore might comfort Snape by reminding him of his good deeds. For example, he could say that Snape's role as a double agent is crucial for the greater good. Dumbledore might also offer a sympathetic ear, listening to Snape's inner turmoil about his past actions and his love for Lily. By validating Snape's feelings and his importance in the fight against Voldemort, Dumbledore provides comfort.
The tragedy of their relationship also draws people in. Snape's love for Lily and his loyalty to Dumbledore despite his difficult past make for great fodder for fanfiction. Writers can explore how their relationship might have developed differently or how they truly felt about each other behind the scenes of the main story.
Dumbledore can hurt Snape in fanfiction by taking advantage of his love for Lily. He might use this love as a tool to manipulate Snape into doing dangerous tasks. For example, making Snape spy on Voldemort, knowing full well that Snape's life is at risk every time he does so.
In the fanfiction, Snape could protect Harry from Dumbledore by using his skills in potions. For example, he might create a potion that hides Harry's magical signature from Dumbledore's detection. Or he could use his knowledge of the Dark Arts to counter any spells or charms that Dumbledore might use to keep tabs on Harry. Snape is very intelligent and resourceful, so he could find various ways to physically and magically shield Harry from Dumbledore.
Typically, it portrays Dumbledore as a manipulator. He's seen as using Snape's feelings for Lily and Harry's role in the fight against Voldemort for his own purposes, rather than having pure intentions.
In some fanfictions, Snape kills Dumbledore as part of a greater plan. Maybe Dumbledore was already dying or had some sort of incurable dark magic on him, and Snape's act was a mercy killing. It could also be a complex plot twist where Snape is actually trying to protect the wizarding world from a greater threat that only he and Dumbledore knew about.
One common way is by giving Snape hope. Dumbledore could talk about the end of Voldemort's reign and how Snape's part in it is essential. For instance, he might say that Snape's knowledge and skills are the keys to victory. Another way is by showing trust. Dumbledore might entrust Snape with more important tasks or secrets, which makes Snape feel valued.
Well, perhaps one of the other teachers might have noticed Snape's behavior towards Harry and reported it to Dumbledore. It could also be that Dumbledore, being as perceptive as he is, noticed Snape's extra harsh treatment of Harry during their interactions in the corridors or in class.
In some fanfics, Harry might hate Dumbledore because he feels Dumbledore has been using him all along as a tool to defeat Voldemort. Dumbledore has been making decisions for Harry without fully considering Harry's feelings and desires. For example, he didn't tell Harry about the prophecy until it was almost too late, and Harry might see this as a form of manipulation.
I really like 'Snape and Dumbledore: A Hidden Alliance'. It presents a unique take on their relationship, exploring how they worked together behind the scenes to protect Hogwarts. It has some really interesting character interactions and a well - crafted plot.