Focus stacking software and smaller apertures (with lights) certainly both work. But if you want to be a badass mad scientist,
buy/build a tilt shift bellows also! Then you can tilt the plane of focus so that even though it's a millimeter, it will go many millimeters deep in your photo.
Novoflex - Tilt-/Shift Bellows will set you back 800 euros apparently.
Other brands too like Hama/Spiratone:
http://forum.mflenses.com/userpix/455_tiltshift_bellows_1.jpg similarly outrageously expensive.
Pentax Hacks is a much MUCH cheaper homemade approximation (maybe $100) but pretty straightforward to make and this guy has already done it with pictures. Would probably work pretty well with a basic 50mm full format lens.
Or the most ridiculous of all I've seen:
How to: Developing a tilt/shift system for 35mm digital camera based on 4x5 view camera «Photigy: Online Studio Photography Lessons lol