Hamlet does accept the duel however, for two reasons: firstly, it offers him an opportunity to resolve his conflict with Laertes, whose forgiveness he craves (a fencing duel with foils - blunted blades - is a courtly sport after all, and chiefly an exercise in male bonding).
Secondly, and more significantly, Hamlet is world-weary and ready to succumb to any outside agency.