Despite the invasions costs, there were at least short-term economic gains as a result of plundering and the confiscation / taking over of resources and factories. Were those benefits so evident in the longer term, though? Were they enough to cover the cost of the occupation, especially in countries such as Denmark, Belgium and Holland which had few resources other than manpower? Did the effects of sabotage, the (presumably) relatively low productivity of a reluctant workforce and the effects of a regional (later global) war significantly the affect the economic viability of the occupation?
Wikipedia gives a good overview of GDP of belligerents, including those occupied by Germany. From this table, it is clear that the economic contribution of occupied nations was significant, this ratio peaking in 1941 where the Reich's total GDP (1145 billion 1990 international dollars) had a 64% contribution from occupied areas (733).
This makes sense; Germany occupied some of the most prosperous nations in the world, so even if there were negative effects from resistance and the general costs of occupation, they are more than offset by the huge economies they took over. As an example, Germany seized 80% of France's food production during this time.
To get a sense of the actual cost of occupation, Germany stationed about 100,000 troops in occupied France, compared to close to 4 million in the Eastern Front, in active combat. Therefore the cost of occupation would be a small fraction of the total military expenditure of the regime.
I'll also note that, in contrast to the popular narrative that the Allies outproduced the Axis to victory, Axis success during the first half of the war (up to late 1941) was based primarily on military factors - such as quality of weapons, strategy, doctrine, esprit-de-corps, martial tradition - not economic ones 1. The turning of the tide was also mostly military in nature, of the Axis powers losing key battles. To a military planner during this time, economics would have been a secondary concern.
1: The economics of World War II: an overview by Mark Harrison
Occupation of western Europe was highly profitable for Germany. Indeed, one reasons she became so threatening was that she had gained so much at so little cost. As a GDP table shows, up to 1939, Germany's GDP was 4/9 that of the United States; by 1941, Germany had completely closed this gap and was a parity with the U.S. That's called "doubling up" (actually a bit more).
A GDP "equal" to that of the United States did not mean equal military capacity, because this was divided among more people, many of them unwilling supporters of the war. Even so, according to Paul Kennedy in "Imperial Overstretch, The Rise and Fall of the Great Powers," Germany had just over one-third of America's war production capacity at the beginning of World war II, by mid-1940, it was over one-half for German controlled Europe. Throw in the alliance with Japan (and its occupied territories) concluded the same year, and the addition of France, the low countries, Italy, Japan, and part of China represented roughly a "doubling up" in military capacity.
Germany lost about 200,000 men killed and wounded. and perhaps 1,400 planes in conquering France and the Low Countries. Putting aside what she was able to "take out" of those countries in terms of industrial goods or manpower, an important gain from the Fall of France was that Italy decided to finally join Germany in the war. During 1940-1943, Italy produced 8,000 planes and contributed four million men to the Axis war effort (per Kennedy).