A court has heard a 15-year-old boy accused of murdering a pensioner in a park wrote a letter claiming to be suffering flashbacks, saying he hated what he had done and adding “I feel like my case is evil”.