Lion's Eye Diamond will have produced the mana before you actually need to pay the madness cost, so you will be able to cast (and pay for) the Madness card discarded to activate Lion's Eye Diamond.
Notably, Lion's Eye Diamond has a mana ability, which means that it resolves immediately, while the Madness ability is a triggered ability that uses the stack to resolve.
From the comprehensive rules (2019-10-04) (emphasis mine):
405.6c Mana abilities resolve immediately. If a mana ability both produces mana and has another effect, the mana is produced and the other effect happens immediately. If a player had priority before a mana ability was activated, that player gets priority after it resolves. (See rule 605, “Mana Abilities.”)
605.1a An activated ability is a mana ability if it meets all of the following criteria: it doesn’t require a target (see rule 115.6), it could add mana to a player’s mana pool when it resolves, and it’s not a loyalty ability. (See rule 606, “Loyalty Abilities.”)
Then the replacement effect and triggered ability of Madness kick in after you already have the mana in your mana pool, with the triggered ability going onto the stack:
702.34a Madness is a keyword that represents two abilities. The first is a static ability that functions while the card with madness is in a player’s hand. The second is a triggered ability that functions when the first ability is applied. “Madness [cost]” means “If a player would discard this card, that player discards it, but exiles it instead of putting it into their graveyard” and “When this card is exiled this way, its owner may cast it by paying [cost] rather than paying its mana cost. If that player doesn’t, they put this card into their graveyard.”
Finally, the Madness triggered ability resolves, at which point you can use the mana that Lion's Eye Diamond has added to your mana pool and/or any other mana sources in order to pay the alternative Madness cost to cast the spell from exile.