Short story: If Denmark by April 1940 had resisted with the OTL forces fully mobilised it is likely that the German invasion of Norway would have failed and that is a major obstacle for Hitler's power and prestige. Combined with the extra German losses in this ATL it quite likely will lead to Fall Gelb bogging down before the French army is broken. That will defeat Germany by 1941 latest.
Of course Denmark would suffer huge casualties in the battles and bombing of cities etc. but it will be a very small price compared to how many died in the OTL WWII.
Longer story: If Denmark for some reason chose to follow an actual armed neutrality policy after WWI and keep the level of armament of OTL WWI the army would be at least five infantry Divisions and a navy capable of effectively blocking the Danish straits with mines.
As a job making project a number of fortification lines are build across southern Jutland and three of the five Divsions are placed in Jutland. The Jutland Divisions are to be supported by mobile Anti-tank units. From 20 mm Madsen automatic cannons mounted on motorcycle sidecars (OTL) to heavier weapons in armoured vehicles. 20 mm Madsen quads are deployed as AAA.
On Zealand is placed the two remaining Divisions and a couple of armoured brigades. The Tune position (between Roskilde and Køge bay) is maintained and strengthened and manned by one of the Divisions. The other Division (mobile) and the armoured brigades are deployed in reserve to counterattack any landings.
The Danish straits are to be mined heavily, to the greatest possible extent by controlled minefields laid in peacetime. The navy is to be focussed on laying and protecting the minefields - ie. coastal submarines, torpedoboats and armoured artilleryships.
The airforce is meant to provide support for the operations of the army and navy.
Germany will of course be able to overwhelm even this armament level, but the cost will be big enough to prevent a succesful Fall Gelb.
So why did this not happen then? Main reason is 1864, Until 1864 the army had been very popular but the defeat created a widespread doubt about armed forces a all: "What's the point?" as one leading politician said. The conservatives were in power until 1901 and spent a lot of money of the fortifications around Copenhagen from alte 19th century, but the doubt in keeping strong armed forces was strengthend by the almost immediate obsolesence of tne fortifications. Technically they were as good as any, but had been placed to keep 1880 artillery out of range of Copenhagen - by early 20th cenury that had changed, but the money was spent. The new liberal government under WWI kept the relatively strong armed forces however, mainly because they were needed to guarantee Germany that the British couldn't just "walk in".
After WWI socialdemocrats took over power anfd although they had strong anti-military views in their opposition time it was actually seriously considdered to go for an armed neutrality in unity with the other Nordic countrries. That was finally given up in mid 30s and Denmark officially announced that she had no intentions of being the Scandinavian guarddog vs. south. The final nail in the coffin of armed neutrakity came when the British shortly before WWII told that no help could be expected in case of German invasion.
I actually think it will be plausible to find PoDs to create an armed Danish neutrality by 1939. We can't change 1864 drastically, as that would probably prevent German unification, but perhaps the same strategic outcome but with more tactical succeses for the army. Could be more mobile operations up the Jutland peninsula. That would make the ill-fated Copenhagen fortification less likely. Could also be the war in 1864 ending with borders similar to OTL 1920.
If a Nordic alliance is created it will obviously mean greater level of armament, but even without the alliance I think slightly more flexible conservative leaders in late 19th century might change a lot. In OTL the conservatives really pissed off the great majority of the population and united them against anything connected to conservatives - not at least the army. The will only have to go toSweden to see how the outcome could be. Here the socialdemocrats were even stronger, but the defence spending never was that much of an issue and Sweden kept a considerable level of armament - and out of two world wars.