That's not cursing. Just because you say "Hell" or "damn" doesn't mean it's the swear of those words. In "City on the Edge of Forever", it's the only time I remember in TOS where they actually swore.
That is true, of course. It's like the saying 'Come Hell or high water' wouldn't be cursing, either. Other than those instances, along with McCoy's "Hell for leather, right out of history." in
Spectre of the Gun, those are the only occurences of the word, I think.
Which brings us to the matter of Kirk's swearing in
City.. that you asked about. I'm trying to remember something else from that era of television which was similar, but so far I can't think of any.
But it does remind me of some parody of
Planet of the Apes I saw a few years back, I have no idea where it was, but I just remember monkeys in the place of humans. Some chimp did Heston's classic line, only it was "Darn you..darn you all to heck!"

I wish I could remember what it was...
Which doesn't answer your question at all, does it?
I'll step aside and let someone useful chime in.