The singer was struck down with a viral infection six months into her pregnancy last November, and lost her unborn son.
But she said she had no idea how serious her own condition was because she was grief-stricken.
According to The Sun, she told an interviewer on her new show, Lily Allen: From Riches To Rags, that, 'It was really quite touch and go for a few days.
'My friends reacted so much more to me being ill compared to what I felt was the most devastating part of it, I couldn't have cared less about myself. I literally was on my death bed but I didn't even feel it.'
The 25-year-old added that the loss changed both her and fiancé Sam Cooper forever.
'I felt so lucky to have Sam and my family around me,' she said. 'There are some women who are so alone and have to go back to ghastly flats on the 17th floor and have no one.
'I don't think I ever realised how good I had it. I spent so much of my life complaining.'