If you have been working in Denmark then consider asking you employer for an "exit interview" (if it is not already planned). Both you and the company can learn a lot from talking about your stay.
International Community - Your Network of Opportunities
In this step-by-step guide you will find information about everything from holiday pay and pension to deregistration of vehicle and taxes.
Source for most of the subjects: lifeindenmark.dk, workindenmark.dk, Business Region Aarhus and Consortium for Global Talent.
See Life in Denmark's guide for leaving Denmark here and Workindenmark's guide here.
We hope you enjoyed your stay in Denmark!