Hi,
Your current residence/work permit is strictly constrained to the specific job/company. If you loose your job before time, you also lose the right to stay and work in Denmark legally, and thus cannot benefit from unemployment benefit.
However you have the possibility to apply for an 6 months extension. How we understand the paragraph about extension, is that you will be allowed to reside (not work) in Denmark in the Job search period.
We have heard about others non-EU citizens working in Denmark, that have a job search period included in their residence and work permit. This means they will be eligible for unemployment benefits during the job search period.
Also we know that if a non-EU national seeks to renew his residence and work permit (of the same type as the current residence/work permit) before expiry, the person concerned retains his right to work in accordance with the permission granted during the period in which the case is dealt with by the Immigration Service (Udlændingestyrelsen) or SIRI.
If the person concerned seeks a different type of residence, he/she retains his/her right to stay, but not to work during the period in which the case is dealt with by the Immigration Service or SIRI.
This is indeed complicated legal matters, and we are not experts in the field of residence/work permit and whether you are allowed to work or not. Therefore we stringly recommend you to consult Udlændingestyrelsen about this to be sure.
However there is no doubt about that for being eligible for Unemployment benefits you must have the right to work full time. Right to stay/reside in Denmark is not enough.
Another thing to be aware of: New rule from January 1, 2019 may affect your right to benefits in another way. In the future you must have stayed in Denmark or another EU/EEA country for 7 out of the last 8 years for being eligible for Unemployment benefits. However the new rule will be phased in over 3 years, so in 2019 the requirement says 5 out of 8 years, in 2020 6 out of 8 years and from 2021 it will be full implemented with requirement for 7 out of the last 8 years.
You can read more about this new rule/law, that has not yet (february 21, 2018) been approved in the Parliament, but propably will, here: https://a-kasser.dk/requirement-of-7-years-of-stay-in-Denmark-or-eea/
Best regards,
Anders, www.a-kasser.dk