If you and your partner decide to separate, then you can get a legal separation or a divorce. Here you can see where to apply and where you can obtain more information.
Usually one will leave all practical aspects in connection with deaths and funerals to an undertaker. You can find a local undertaker by searching for undertaker (in Danish bedemand) on the internet. However, nothing prevents you from arranging a funeral or interment yourself.
If the funeral is to take place in the National Evangelical Lutheran Church (folkekirken), the deceased must be a member of folkekirken. Otherwise you can have a non-religious funeral.
If you need Copenhagen Cemeteries' customer centre will readily advise you about it all.
In Denmark we have the National Evangelical Lutheran Church ('folkekirken' – the people's church), and about 78% of the population are members of this church.
However, this does not mean that the Danes are a particularly religious people. You can read more about folkekirken, other religions in Denmark and the Danes' attitude towards religion here.