It would be unfair to say that Deadpool, 20th Century Fox's R-rated, box office breaking superhero fare, didn't have its fair share of darkness laced throughout.
With a bad skin condition ("like an avocado had sex with an older, more disgusting avocado") and near limitless regeneration capacity, Wade Wilson's wise-cracking, fourth-wall breaking mercenary Deadpool captured the hearts of fans both onscreen and in the comic books over the two decades of his existence with his easy humor, but why is Deadpool the way he is?
A man with a tormented origin, his tendency to break the fourth-wall has been theorized as a symptom of his mental illness: a coping strategy that he uses to deal with the reality of his existence. In pop culture he's a funny antihero, but the origins of his character are even darker than what we saw in the movie...
Wade Wilson's earliest years are still largely unexplored and muddled; we know that he loses his parents, but depending on which canon or retelling you subscribe to the way his parents are portrayed is very different.
In one version, a very young Wade is abandoned by a father that was loving until he left; in another, his father is present for longer but is an abusive drunk; in another, he's molested by his mother and beaten nearly to death by his father; in another tale, he kills his own parents during his time as a merc, not knowing who they are.
This incoherency is partly due to the confusing canonical nature of comic books as they change continuities from writer to writer and reboot to recon, but also due to Deadpool's mental instability and confused memories — his recollections change almost every time.
One of the most widely accepted of Wade's early origins (told at a time when he had supposedly been "cured" of his mental instability) involves the loss of his mother to illness at a young age. As a reaction to her death, Wade grows into an angry and violent teenager, and his actions eventually lead to his military-man father being killed in a bar fight instigated by Wade himself.
When his father steps in to try and keep his son out of trouble, he's attacked by Wade and then other patrons of the seedy bar, shot dead for his trouble.
The Cancer Diagnosis
Again we don't know all that much about Wade's life before he became Deadpool, other than his relationship with Boston prostitute Vanessa Carlysle (Copycat). They fall in love, but when Wade receives his terminal cancer diagnosis he breaks up with her and leaves her heartbroken (as we saw in the movie).
In a last ditch attempt to cure his cancer, Wade joins up with Department K, a subsection of the Weapon X program. Through them he receives imperfect healing abilities gained from their experiments with the DNA of Wolverine (Logan). However, Wade doesn't get on well there and is sent to another facility run by Dr. Emrys Killebrew, the real architect of Deadpool (who we didn't see in the movie).
Dr. Killebrew and his orderly/henchman Ajax (Francis) experiment on Wade, leaving him physically and emotionally scarred, and he develops a particularly antagonistic relationship with Ajax, which will become important later down the line.
Ever wondered where the name "Deadpool" came from? In the movie its taken from the betting pool in Weasel's bar, Sister Margaret's, but in the comics it's slightly different. While being held in the Weapon X facilities, the other inmates run what they call the Dead Pool, betting on how long Killebrew will keep Wade alive to torture him, experimenting on his healing ability over and over again.
So, it's around this time Wade starts to lose his grip on reality and wishes for Death, visualizing her in human form (commonly referred to as Mistress Death) and lusting after her. She tells him that she cannot kiss him until he dies, so he starts to look for a way to kill himself.
Around this time he discovers that Ajax's real name is Francis — which he hates. Wade, of course, uses this to mock the orderly, sending him into fits of rage. But Dr. Killebrew won't let Ajax kill Wade, so he starts punishing other inmates instead, lobotomizing Wade's friend Worm.
As per Ajax's plan, Wade puts the brain damaged Worm out of his misery, breaking his neck and killing him. By killing another inmate Wade has broken Killebrew's rules and so the doctor decides to finally let Ajax kill Wade. Which he does, by literally ripping out his heart, because Francis has no chill.
This event and Wade's desire for revenge fully activate his healing power and, instead of dying, he grows an entirely new heart. In turn, this causes his mental state to deteriorate further and he sinks into madness, becoming Deadpool.
Depending on which continuity you reference, Deadpool then either fights his way out or is dumped out of the facility into a pile of corpses. Thereafter he resurfaces as the Merc with a Mouth that we know and love, though his path from there on out isn't exactly all jokes and smiles. Maybe we'll see more of this in Deadpool 2?