The meaning is something which is dead, with no chance of revivial, in modern terminology, it refers to an idea or concept which is seen as beyond redemption. It probably comes from the war, when any sailors who died in the sea were left floating on the surface - dead in the water - which is a pretty final way of describing their status.
More likely comes from the days of sail. When there was no wind, the ship was 'dead in the water' ie going nowhere, which is more or less what it means today, although it is still a shipping term for a ship which is not moving.
Thanks for correcting my erroneous answer. As for 'the doldrums' - it's an rea of ocean (not sure where) which is famous for its lack of wind. Sailing ships could remain becalmed (or indeed dead in the water) for weeks at a time, a miserable experience, hence the adaptation of the phrase for anyone who is feeling a bit miserable.