You should be able to regenerate the directory using something like this:
for i in $(dpkg -l|awk '/^ii/ {print $2}')
do
apt-get --reinstall -y install $i
done
What that snippet should do is reinstall every package you already have installed. It will also upgrade everything. If you don't want to do that, you'll have to extend the script to install the specific version you currently have installed, which is not guaranteed to work as those packages may no longer exist in the repository.
More info and a slightly different approach:
http://people.adams.edu/~cdmiller/posts/Ubuntu-dpkg-recovery/
EDIT: Important tip from the above linked article:
Some packages will still not install correctly as more stuff is missing from /var/lib/dpkg. In particular the package "ucf" is important to enable the kernel and possibly some others to install correctly.
Without /var/lib/dpkg/info/ucf.templates the kernel install produces this error:
failed to install/upgrade: User postinst hook script [/sbin/update-grub] exited with value 10
Install ucf:
apt-get --reinstall install ucf
That article describes recovering from completely deleting all of /var/lib/dpkg, so this extra step may not apply to your situation.