Well, perhaps in the fanfiction, Ash is betrayed by a group of friends he trusted deeply. They might have used him to get access to some rare Pokémon or some important information, and then they turn their backs on him. This would be a huge heartbreak for Ash, who is always so loyal to his friends. Or it could be that he fails to achieve a major goal like winning a big Pokémon tournament due to some unfair circumstances, and he feels heartbroken as all his efforts seem to be in vain.
A new, powerful villain could be the cause. This villain might target Ash's Pokémon and manage to steal them all away. Ash would be heartbroken not only because he lost his Pokémon but also because he feels he has failed to protect them.
It could be that there is some misunderstanding between them. Say, Misty misinterprets something Ash does as him not caring about her anymore. Ash, being clueless about her misinterpretation, doesn't correct it in time. Then Misty distances herself from him, and Ash is left heartbroken when he finally realizes what has happened.
It could slow him down. Ash might be so distraught that he doesn't focus well on training his Pokemon. His usual enthusiasm for battles and catching new Pokemon might wane, as his mind is preoccupied with his broken heart.
Gary could also be the one to cause Ash's heartbreak. Maybe Gary outshines Ash in a big Pokemon battle and then mocks him for it. This could make Ash feel like a failure and break his heart. Gary has always been a bit of a rival to Ash, so this kind of situation is plausible in fanfiction.
One common theme is unrequited love. Maybe Ash has feelings for a character who doesn't feel the same way back. Another could be betrayal. For example, a friend or a loved one betrays Ash, which leads to his heartbreak. Also, the theme of loss can be present, like losing a Pokemon that was very close to him, which shatters his heart in the fanfiction.
One possible reason could be unrequited love. Maybe Natsu has feelings for someone who doesn't feel the same way about him. This could lead to his heartbreak as he realizes that his love is not reciprocated.
A plot twist could be that the person who breaks Harry's heart has a secret identity. They could be a spy from an enemy group, but during their time with Harry, they actually fell in love too. However, their loyalty to their original group makes them break Harry's heart. Or perhaps the heartbreak is due to a time - traveling incident. Harry meets someone from the future who has to leave him in order to preserve the timeline. And also, it could be that the one who breaks Harry's heart is actually under a spell that makes them act out of character, and when the spell is broken, they try to come back to Harry but it's too late.
He might isolate himself at first. Natsu could withdraw from his friends and normal activities, needing time alone to process his pain. This is a common way for people, or in this case, characters, to deal with heartbreak.
Loss is a major theme. It could be the loss of a Pokémon, a friendship, or a dream. If Ash loses a Pokémon to an incurable illness or if his dream of becoming a Pokémon master seems out of reach, it would cause him to be heartbroken.