Disclaimer: I don't own Death Note.
It is popular belief that when somebody is close to their death, they know it in their hearts. Even though they don't know exactly when, or how they will die, the person knows that someday soon will be the day of their death. They experience a strange, ethereal feeling of tranquility and accept their fate.
This was true in L's case. The moment that Light held the Death Note in the helicopter, L knew that he was Kira. He couldn't explain how, but he couldn't shake the feeling and became convinced that this was the case. It wasn't some life-changing epiphany to him, it was just a fact. At that moment, he also knew that Light would kill him, even if it were indirectly.
Light never realised this, but L had been trained to detect even the slightest of changes in a person's demeanour. He saw Light's small smirk, and he noticed the glint of maliciousness had returned to his eyes. He could sense Light writing Higuchi'sname next to him, and silently counted the forty seconds. His theory was proved correct when Higuchi collapsed, clutching at his heart.
If L had known that Light was Kira beforehand, he would've told the investigation team, and worked to find solid evidence. Light probably would've been behind bars before he even realised what was going on. But now, he just didn't care. It wasn't like the depression he had felt when Light had lost his memories of being Kira. Instead, it was a rather pleasant feeling, similar to how a person feels watching a show they don't care about, and knowing how it ends.
Of course, L didn't know when he was going to die. He just couldn't rid himself of the knowledge that he would be dead soon. Before he felt this, death had seemed like a terrifying thing. It was the only thing in the universe that nobody would ever know the answer to unless they experienced it first-hand.
So, when L felt his heart stop, he was not surprised in the slightest. He had been anticipating it for months. When he saw Light smirk at him, and finally reveal his true self, it was no shock. He could hear Light screaming (it was very convincing acting) and the task force shouting at him to snap out of it, but he couldn't physically open his eyes (even if he had been able to, he probably wouldn't have cared to).
L saw his life flash before his eyes, and thought with a detached amusement how cliché it all was. Memories flicked past his eyes at the speed of light, but he was able to see each and every moment of his life, as if it were nothing more than a film. He saw a young L come home to his parents dead on the floor, surrounded by useless police officers, who only worsened the situation. He watched as the five year old version of himself met Wammy for the first time, and was introduced to the orphans at the Wammy's house. A 16 year old L left the gates of Wammy's with Quillish himself walking out after him. Memory after memory ran through his head, quickly leading up to his final moments.
He felt himself become enveloped in some otherworldly emotion that was completely foreign to him, and he smiled (at least, it felt like he did).
Even though Light had won, L couldn't summon the will to care. After all, it didn't matter anymore. There was no way he'd be able to come back to life, and he knew it. He was completely fine with it. It didn't even seem to matter whether Light would win in the end. He would either be caught and executed, or rule as the God of the World.
But that didn't matter to L anymore. All the memories of his life faded, until he was completely engulfed in the feeling of ignorance. Slowly, every thing began to turn a pitch black, and L was left in complete and utter darkness.
