since i dont really know the context i dont know for sure but i believe writing a poem could be a way of making peace with strong feelings. Most generally artists use their art to express themselves in which, Keats used writing poetry to help express the deep emotions they were feeling when the event or trauma occured