I don't think you will find a 40" LCD that you can fit in there. Try a 37" LCD such as from JVC, about 36" wide.
Pansonic makes a 37" HDTV plasma (TH-37PX50U) which will barely fit, about 38 and 1/8 wide. They also have 2 models of their industrial line plasmas (very popular with consumers) in EDTV and HDTV that are about 36.5 wide. They have no tuner or speakers and you have to get the stand extra (check out Visual Apex.com).
Whatever you get you need good ventilation in there, might need a equipment rack fan back inside to keeps things cool.
I want to get the largest flat screen that I can fit in my armoire, which is exactly 38.5" wide. Is anyone aware of a 40 inch that narrow?