In his essay, On Fairy Stories, Tolkien writes that a primary defining characteristic of the Fairy Story (which I take to include all works of fantastic/mythic fiction) is the eucatastrophe. This is the unforeseen stroke of good fortune that comes at the end of the story, just when all hope is lost. The happy ending.
Happy endings have gotten a bad rap from jaded modern movie audiences because in unskilled hands they so often feel clumsy and contrived.
The eucatastrophe in The Lord of the Rings feels organic because when the ring hits the lava, everyone is acting in accord with their authentic motives and flaws. Tolkien said that he just watched that scene play out with all of the characters doing what came natural to them at that moment.
In The Writer’s Journey, Christopher Vogler suggests that the mythic themes employed by writers in their work also tend to arise in the life of a writer. At least that’s a meaningful lens through which to view your own path of trials and ordeals when the rejection slips are coming in. There will be mentors, threshold guardians, and temptations.
When all hope seems lost, when you least expect it, the eucatastophe may occur and you may actually get the damned thing published. But I do wonder if this happy outcome is more likely to occur when you resist the temptation to try and force a positive result by contrivance, and instead just stay on the path, true to the impulses that set you in motion in the first place.