He would probably go through a range of emotions. First, disbelief as he approaches the body. Then, as he confirms it's Beckett, there'd be this overwhelming grief. He might blame himself, thinking that if he had been there, he could have prevented whatever led to her death. He'd also have to deal with the emptiness that comes with losing the person he loved so deeply, and it would be a long and difficult process to come to terms with it.
Castle could initially deny it's her. He'd look for any sign that it's not Beckett, checking for details that are off. As he realizes it is her, he'd break down, crying uncontrollably. His world would shatter because she was such an important part of his life, and he'd be filled with regret for any unsaid words or things they didn't do together.
He could become more withdrawn. Losing Beckett like that would make him hesitant to let people in again. He'd be more guarded, fearing another loss.
Castle might become obsessed with finding the truth about what happened. His writer's mind would start formulating theories and he would stop at nothing to get justice for Beckett, which could put him in dangerous situations.
He would likely feel extreme shock. Just the sight of her body could send his mind into a tailspin. He might also be in denial at first, not wanting to believe that it's really her.
In a fanfic where they have a baby, their relationship would shift. They would now be partners not only in crime - solving but also in parenting. Castle would likely become more domesticated, helping with diaper changes and midnight feedings. Beckett would have to learn to let Castle in more on the parenting front, and they would communicate more about family - related matters. This new aspect of their relationship would add a different layer of complexity and closeness to their bond.
He might react with jealousy. He could glare at Josh and then give Beckett a hurt look before storming off.
A Castle and Beckett baby fanfic could be about their journey into parenthood. It might explore how they adjust to having a baby in their lives. For example, Castle could be super excited and start writing new stories inspired by his new family experience, while Beckett might be a bit more cautious and protective.
It might start with Castle getting the news of Beckett being in a dangerous situation, like a crime scene or an accident. Then he rushes to the location where her body is supposed to be.
He could react with anger. After all, if he has feelings for Beckett, seeing her with someone else like Vaughn might make him furious. He might lash out at both Beckett and Vaughn without really understanding the situation.
He might be in denial at first. He could keep trying to convince himself that there's no way Beckett would leave him.
There could be. The Castle fandom is quite creative, and a pregnancy plot for Beckett is a popular trope in fanfiction. Some fanfics might focus on the romantic aspect of it, with Castle being over - the - moon and taking extra care of Beckett. Others might explore the more practical and challenging sides, such as Beckett still trying to solve cases while dealing with pregnancy symptoms.