Hexen 2 is based on the Quake1 engine. So follow the Quake1 directions here http://www.3dconnexion.com/forum/viewtopic.php?t=4320
(glh2.exe is the opengl renderer, h2.exe is the software renderer.)
and just substitute
Select the joystick template from the dropdown menu when creating the profile.
Where to buy
Where to obtain the patch
-Delete/move/or rename opengl32.dll in your Hexen 2 directory if you get an error concerning opengl32.dll or glide2x.dll.
-Create a shortcut and use command line parameters to alter the resolution
such as "C:\Hexen II\glh2.exe" -width 1920 -height 1200
Heretic 2 is based on the Quake2 engine, so it should have analog 3Dmouse/joystick support as well, however, they removed the support for analog movement, so movements are just on/off just llike Quake3.