Do you think that Near and Mello are different parts of L's personality?
Perhaps Near is cold, logical, and apathetic side of him, while Mello is the emotional, impulsive, determined side of him that is willing to take drastic measures to reach his goal. Maybe Near is the childish part of his personality, while Mello is the one that hates to loose. And since Mello likes sweets, (chocolate), and Near likes playing with toys, together they might represent the part of him that likes playing with his food. Maybe if Near and Mello worked together, they would be equal to L. So maybe L didn't really die, just the extreme versions of the split sides of him appeared, instead. and it could be that Mello got killed, because it's the Mello side of him that L ended up dying because.