South Korea's impeached president is set to appear at a hearing to oppose a formal arrest over last month's imposition of martial law.