Ancient Egyptian Pharaohs, etc
In Mayan culture there was an interesting shift from the classic period where holy men were essentially the revered leaders when their understanding of the stars was crucial for crop timing, as well as being able to explain many other things that improved tribal cohesion. Later, as the civilization became more established, kings started shifting more and more power to themselves, away from the priests, but keeping that aura of divine right, now personified more directly.
I can only imagine it varied across cultures, usually starting as a great way of justifying rule, but then once a newborn prince is simply told he's a god and treated as one, he really will believe it to varying extents.
Evidence in Egypt suggests if it wasn't believed by th kings themselves, they certainly did a great job of convincing everyone they did believe. Internally, as in all religious matters, it was sure to vary wildly.
I've studied a bit about the sources of "royal authority" in Homeric society. One of the conclusions seems to be quite pragmatic- because meat was scarce and valuable, only the very wealthy could afford to supply the flesh for sacrificial rituals. This put them in the natural position to govern the ritual and reinforce their connection to the divine.
This is a little bit off topic as the Homeric king wasn't considered to be a God King, but they certainly interacted directly with the gods. (Think of how many gods Odysseus interacts with along his journey.) But I thought it would be a good way to show how a king can use his economic power to reinforce his religious authority.
From my paper:
"The king’s moral or religious authority came from this connection to Olympus. The connection was most firmly established through his role in conducting sacrifices. Bonner and Smith state that this was the original and preeminent role of the Homeric king: “His earliest function as village chief in the earliest stage of society was doubtless the superintendence of the sacrifices for the community. This is one of his important functions in Homer.” The primacy of Agamemnon is established in his role as leader of sacrifices, such as at Iliad 3.275. Hitch notes that “the sacrificer enjoys a special religious designation as the intermediary between man and god through his connection to the sacralized offering.” It is obvious that the person controlling the sacrifices would be able to claim a special religious authority. The question raised, however, is whether the right to perform the sacrifices comes from any religious prerogative, or is it merely the case that the basileus is the only one with enough wealth in his animal herds to be able to provide the meat? Hitch concludes that it is likely the latter case- that the elevated economic status of the king allows him control over the offerings. "
Hitch, Sarah. King of Sacrifice: Ritual and Royal Authority in the Iliad. Cambridge: Harvard University Press, 2009.
Bonner, Robert J., and Smith, Gertrude. The Administration of Justice from Homer to Aristotle. Chicago: University of Chicago Press, 1930.
In ancient China, much of the concept of "right to rule" was filtered through what is known as the Mandate of Heaven - essentially the Chinese version of the Divine Right of Kings. A monarch or line of monarchs derived their authority from being direct representatives of the heavens, and the chief conduit through which rituals, sacrifices, and communication with the spirit realm was conducted. The earliest Chinese dynasties - the Xia (speculative), the Shang, and the Zhou, respectively - all placed huge import on their Kings' connection to the spirit realm, and their ability to correctly predict coming events through pyromancy and bone-reading. When those kings fell out of favor of heaven, it was thought that the physical world itself would show its displeasure and their loss of the Mandate of Heaven through disasters, uprisings, plagues, famine, and the ultimate overthrow of the dynasty by the one that would supplant - retroactively recognized as the new chosen of Heaven (a very convenient detail for the usurper).
By the Qin Dynasty in the late 3rd century BCE, though, China had undergone some 200 years of fracturing into independent "states" or "kingdom," and near constant civil war. Though there had been nominally been an overarching Dynasty king throughout the entire Warring States Period, they had been little more than ceremonial figureheads for generations by the time the King of Qin unified the Warring States into his Empire.
The First Emperor of Qin, 秦始皇, declared himself the direct descendant of the Yellow Emperor 黃帝 - the divine mythological emperor who had descended from Heaven itself to found China. He declared his given name and its homonyms both holy and taboo. He would refer to himself by using the "royal We," zhen, and others were allowed to address him only by "Your Majesty" in person, or "His Highness" in writing. This was, though, a power maneuver - putting himself above any other king by appropriating the religious symbols and mystery of old.
That said, Qin Shi Huang wasn't immune from believing in fantastical notions. Though he most likely wasn't so silly as to actually believe in his own hype, that didn't stop him from trying to actually achieve such divinity. Later in his life, he became obsessed with finding an Elixir of Immortality which would allow him to live forever. At the time it was believed that eternal, precious elements could be alchemically concocted to bestow their properties onto the imbiber. The solution the First Emperor finally arrived at after years of searching... was that mercury was his solution. Beautiful, liquid, eternal, silvery mercury. Needless to say, in pursuing divinity and eternal life, he earned his place in the Ironic Deaths Hall of Fame.
It was his son, the Second Emperor, who bought into the whole god-king bit. The Second Emperor, convinced that as the Son of Heaven, mortal should never see his face nor hear his voice, became a complete shut-in. He did not interact with his ministers and advisers, save for his eunuch Zhao Gao. In the span of only 3 years, the Second Emperor's ridiculous outlook, willful blindness, and complete subservience to his eunuch-Chancellor had unmade the Qin Dynasty and thrown the Chinese state right back into civil war after a mere 14 years of unification.
Archeologist Gyula László in "The Life of Hungarians Around The Land Conquest" says that in the ancient Hungarian Pagan religion every father's family was supposed to have all kinds of magical powers, like for example he must divide and hand out the food because it receives its nutritious power from his touch. This largely because he is the priest of the family. And tribal chiefs, and princes are to be seen as basically just like fathers on a larger scale.
Some sources say that one such sacred ruler at least accepted being sacrificed i.e. ritually killed. That is fairly a serious thing. http://en.wikipedia.org/wiki/%C3%81lmos
I don't think this question can be fully answered for several reasons:
Finally, I have one big problem with the word "religion", which is somehing that, after Tertullian, was used by Christianity to define itself, so it doesn't really apply to pre-christian cultures.