In the Justice League episode "Tabula Rasa", after beating all the members of the League and gaining their powers, the antagonist android AMAZO decides there's no challenge left for him on Earth and simply leaves to travel the universe. He eventually returns to Earth in Justice League Unlimited and helps the League on several occasions.
Amazo's godlike nature was also directly referenced by the other characters. Lex Luthor is openly dismissive of the idea, but Superman notes that if Amazo comes back, Luthor will be "doing a lot of praying".
Two other characters in the DCAU universe are close to this nature. One is Darkseid, naturally, since he and his entire species are actual gods. The second was the combined being of Lex Luthor/Brainiac.
Afterwards, Luthor became obsessed with reattaining Godhood, with some horrible consequences...
In the Batman: The Animated Series episode "Fire From Olympus", Maxie Zeus believed himself to actually be the Greek god. As he is brought into Arkham, he perceives it as a return "home" to Olympus, inhabited by the nature goddess Demeter (Poison Ivy), two-faced Janus (Two-Face) and trickster Hermes (the Joker).
In another BtAS episode, Scarecrow screamed out "WORSHIP ME, YOU FOOLS! WORSHIP ME!"
Beast-Era Megatron, starting in the Grand Finale of Beast Wars. After discovering his G1 namesake's old flagship, the Nemesis, he starts raining fire on the landscape while quoting the Covenant of Primus, which is the closest thing we've seen to a Cybertronian Bible. He clearly considered himself to be god-like throughout Beast Machines. In the last couple of episodes, he started raving about actually becoming one - and he nearly did, too.
In Transformers Cybertron, Megatron sought the series' Plot Coupons in order to become a god. Starscream wanted this power for himself, which was what led him to betray Megatron. Successfully, too; an Enemy Civil War resulted. As a result of their progress towards godhood, the final battle between Starscream and Galvatron caused further damage to the fabric of reality.
Zhao: I am... a legend now. The Fire Nation will for generations tell stories about the great Zhao, who darkened the moon! They will call me Zhao the Conqueror! Zhao the Moon Slayer! Zhao, the INVINCIBLE!
Fire Lord Ozai's abdication of the Fire Nation throne to become the self-styled "Phoenix King":
Ozai: "Fire Lord Ozai is no more. Just as the world will be reborn in fire, I shall be reborn as the supreme ruler of the world. From this moment on, I will be known as the Phoenix King!"
Willow, a villain in one episode of Wakfu, invokes this after stealing a magic hammer.
In Metalocalypse at the end of Fatherklok, Skwisgaar declares himself a god, though it's unclear as to whether he's a god, the son of a god, or just being his usual egomaniac self.
Though the description of guitar god is an undisputed one.
A villain becomes this when he dons a talisman which grants him the form and powers of Anubis, the Egyptian deity of the dead. He even said in his own words "I AM ALL POWERFUL!". At least until he lost his talisman.
Interestingly, Ron Stoppable might've reached a level close to this in the Grand Finale when he called upon the mystical energies he's had in him ever since the third episode of the series to take down the aliens that not even Kim and Shego could stop.
In the "Cartoon Wars" episodes of South Park, Cartman thinks he's managed to pull Family Guy off the air:
In "Cartman's Incredible Gift", the police comes to the serial killer's house, who refers to himself as God. The not-too-bright officers take this to be his real name.
In "The Hobbit," Kanye West tells a bedtime story based on the episode's events, and his role is done by God.
Futurama: Bender becomes a god to the Shrimpkins he picks up while floating through space. It didn't last long or end well.
He also became Pharaoh of an ancient Egypt-style planet; since pharaohs are viewed as gods...
The Avengers: Earth's Mightiest Heroes plays this straight with Graviton and the Leader. But subverted with Thor, since he is the real deal though Hawkeye ("Thor is crazy") and possibly Ironman ("Thor's probably off in Fantasyland") believe he is delusional.
Moral Orel has a darker version of this in the form of Miss Censordoll, who had her sexual organs surgically removed as an infant. Due to her immaculacy she believes that she is a physical god.
In Generator Rex, all of the problems in the series related to Nanites can be traced back to the Consortium's desire to play God with a bunch of special Nanites that grant control over the fundamental forces of the universe and the desperate measures the scientists in charge of the Nanite project took to keep that power away from them. Namely, triggering the Nanite event.
Rex becomes one in the final episode, but deactivates it after curing all EVOs.
Played for laughs in one Teen Titans episode where the team is separated while stranded on an alien planet. Raven has the comic relief story for a change; she encounters a bunch of tiny, cute-looking aliens who, by the end of the episode, start to worship her.
The Prince of Egypt never says this exactly, but Ramsees repeatedly refers to himself as "the morning and the evening star," pointing to the fact that as Pharaoh, he is supposed to be a god incarnate. A major theme is Moses trying to make him realize that there is, in fact, a force more powerful than his own decrees.
One episode in Family Guy has Peter proclaiming that he has divine healing powers that cured Chris of his cancer (the two of them are in cahoots). This causes the townspeople to believe Peter to be a god and Peter then starts acting like he is God until the real God starts to punish the family until Peter stops with his shenanigans.
In The Simpsons Homer was place in charge of a power plant in India, where he suddenly though he was a god when he opened a bottle cap and won a free soda. He soon turned the plant into temple of himself, where the workers seem to worship him. In the end, however, it turns out they knew he wasn't divine—they just really loved him because he gave them so many new benefits (to Mr. Burns' horror).
In The Legend of Korra, Unalaq's goal is to become the Avatar, but by merging with Vaatu, the spirit of evil who is the opposite of Raava, the spirit of good, who is already merged with a human as the current Avatar. Once he does so, he also plans to destroy Raava in order to usher in a new age of darkness. Unfortunately for Korra, he succeeds at both, forcing Korra to use the power of the cosmos instead as well as requiring Jinora's unexplained assistance to defeat Dark Avatar Unalaq.