In-universe, the two are very much linked. I'm going to use passages from the novel, because even though many of the relevant passages exist in the film, some of the nuance is lost or truncated.
Ender was chosen by the International Fleet for Battle School because of how he handled the bully. I can't find the exact wording from the movie script, but the scene does exist in the movie. From the novel, when Colonel Graff interviews Ender after his fight with the bully:
[Graff] "Tell me why you kept on kicking him. You had already won."
[Ender] "Knocking him down won the first fight. I wanted to win all the next ones, too. So they'd leave me alone." Ender couldn't help it, he was too afraid, too ashamed of his own acts; though he tried not to, he cried again.
When Ender fights the Formics and destroys them, we see his reasoning - though he does not know at the time he is actually fighting them. He thinks he is just breaking a simulation. But Ender does explain a little of his tactics to Valentine before he goes to command school (in the film, this also exists, though I believe the conversation takes place slightly differently):
"I think it's impossible to really understand somebody, what they want, what they believe, and not love them the way they love themselves. And then, in that very moment when I love them...I destroy them. I make it impossible for them to ever hurt me again. I grind them and grind them until they don't exist."
The novel is very much about the character of Ender, and if you read the entire Ender quartet (Speaker for the Dead especially), you see what the xenocide did to Ender. Ender very much wants peace, he's not an aggressive person, but he will do whatever it takes to win. He is very angry at being used by the I.F. Command (tricked, really), and you can see this in his talking to Graff before he leaves for Command School.
[Graff] "We used every means we could think of to communicate with them, but they don't even have the machinery to know we're signaling. And maybe they've been trying to think to us, and they can't understand why we don't respond."
[Ender] "So the whole war is because we can't talk to each other [...] What if we just left them alone? [...] Maybe they didn't know we were intelligent life. Maybe-"
[Graff] "Ender, believe me, there's a century of discussion on this very subject. Nobody knows the answer. [...] Nature can't evolve a species that hasn't a will to survive. [...] So if we can we'll kill every last one of the buggers, and if they can they'll kill every last one of us."
"As for me," said Ender, "I'm in favor of surviving"
But what happens after shows the character of Ender, and I believe that's the real center point of the development of Ender's Character (major spoilers for the rest of the Ender quartet).
Ender goes on to find a new Formic Queen larva and is able to communicate with it over many years. In the end, he does find a place for them to re-establish their society and no longer being 'extinct'. Ender sees this search, which takes hundreds of years counting all the time spent at relativistic speeds searching for a suitable place, as his duty since he is the one who caused the Xenocide. Through his writings, called The Hive Queen and The Hegemon, Ender brings awareness to the fact that much of the war was caused simply by not being able to speak to each other. And that is the central thrust of his work as Speaker for the Dead - to bring out the truth, and to make sure everyone is understood.