The setting of Keats's "Ode on Melancholy" is a bit hard to pin down. Since it's about an emotion or mood, we like to think it takes place in the reader's mind and imagination.
Still, we can point to a few specific places that the poem mentions. The first stanza seems to take place on the banks of the River Lethe, on the borders of the underworld, since the speaker advises the readers not to forget our misery through drugs or suicide that would take us to the underworld.
The next stanza seems to take place in the springtime, but it's a spring in which all the beautiful flowers and leaves are shrouded in a melancholy mist. Then, the final stanza seems to take place in a kind of religious temple—the reader is there to appreciate pleasure, but then we realize that there's a shrine to melancholy in the corner. It's impossible to feel pleasure without also acknowledging and experiencing melancholy.