I have no idea how easy or complicated it is to get married in Denmark but once you are married, you should be able to live with your wife under EU rules in any EU country where she works, except Poland itself which might apply additional restrictions (if she has no work and no money, it's more complicated). See ec.europea.eu and Your Europe for an overview.
If you get married in a non-EU country, more paperwork would probably be needed (translation, apostille, etc.) but it would still in theory be possible. You don't need to stay in the country where you married either.