From my experience a destroyer will search for you where it expects you would be if you kept the course he last saw you on before making a pass. For that reason I often deliberately run at 2/3 or reload torpedoes when I know it's on to me so as to make sure to be heard, and give about 15-20 degrees of rudder when it's pinging. Then as he begins dropping the depth charges I go to flank and make a radical course change to the opposite direction and stay at flank for 20-30 seconds, checking where he is to present a minimal profile. This way he will [hopefully] be slightly put off and drop his next line of DCs somewhere else than on my head.
It goes something like this (please excuse my poor MS Paint skills

)...
Of course this works better at near-critical depth and before 1943, but it's still adequate later as long as you're not getting pounded by a full horde of DDs. But then if there are only one or two DDs, it's sometimes easier to go to periscope depth and sink 'em...