I answered this question a while ago in this thread. In Ancient Greece, the actual names of gods and heroes were extremely rarely used. At the same time, some of the most common names were theophoric - they carried the name of a deity within them. For example, no one would be called Zeus, but many people were called Diodoros or Diodotos (gift of Zeus), Diokles (glory of Zeus), or even Dion. Herakles is itself a theophoric name meaning "glory of Hera".
I can only speak for ancient Egypt (and, by necessity, only the elite of ancient Egypt as it is almost exclusively their cultural experience that has survived to us in writing). Names of gods were not common as given names, I cannot think of a single example off the top of my head, apart from maybe the obscure King Hor Awibre, whose nomen is simply Hor, or Horus.
Theophoric names were extremely common however, i.e. names that contained the name of a god in some sort of phrase. Ramesses II's full name (well, not his full name but the way he was usually referred to on monuments and such) was Usermaatre Setepenre Ramesses Meryamun. This means roughly "The Maat of Re is powerful, chosen of Re, born of Re, beloved of Amun." Maat was both an abstract concept roughly analogous to truth, justice, the right order of the universe etc. and the name of a godess, just as Re could mean both the god Re and the sun more generally.
The names were often quite formulaic, and practically any god could be used (but certainly in the New Kingdom Re and Amun were the most common). Tutankhamun for example was born as Tutankhaten - living image of the Aten - but when his father's enigmatic religion was undone and the old pantheon restored, his name changes to Tutankhamun - "living image of Amun." (Incidentally this is the reverse of what his father did, who expunged the name of Amun from his own titulary during his reign.) Tutankhamun's wife and half-sister Ankhesenamun is a similar case, she was born as Ankhesenpaaten - "she lives for the Aten" - but substituted Aten for Amun later on.
This was not just a royal prerogative either. Theophoric names were standard for non-Royal people too; Horemheb for example was a very common name in the late 18th dynasty, (most famously used by the general who eventually became king but was not born Royal). It means "Horus is in jubilation". Incidentally, the aforementioned Horemheb may in fact be the same person as a certain Paatenemheb, indicating that non-royal people also changed their theophoric names during and after the reign of Tut's father, Amenhotep IV/Akhenaten.
The importance of names, especially theophoric ones, to Egyptian culture is demonstrated also in the Turin Judicial Papyrus, a New Kingdom text which records the trial and punishment of those implicated in the so-called "harem conspiracy", a (likely successful) plot to assassinate Ramesses III. The most common punishments were execution and forced suicide, but some of the accused were given an additional punishment; the changing of their name. Some were essentially insults, like "this blind servant" or "this evil Huy" but others were theophoric in a negative sense, including "Re blinds him" and "Re hates him".
As an interesting aside, while names of gods were not typical as given names in pre-Christian Egypt, there are in fact saints in Coptic Christianity whose names are the same as Greek and Egyptian gods. Two prime examples are Abba Amun and Apollo the Shepherd. Some have taken this to mean that the old gods were somehow retained in the form of saints, but this seems unlikely in my view. While Christian traditions almost invariably incorporated elements of the pre-Christian culture, it seems that names of gods simply became given names late in Egyptian history and by the Coptic period they had lost their pagan association and simply become names, much like modern days of the week like Wednesday and Thursday technically honour pagan deities but nobody actually associates them with anything other than days.