This may not get points for realism, but have you tried setting your depth to 40ft and ramming the minesweeper with the periscope blades? Works well for DD's (although you won't get credit for sinking it.)
At the very least it would get you out of your situation.