This challenge are both easy and hard. Magnus of Denmark brother of Frederik II did try to become king of Livonia, but failed partly because lack of support from his brother (partly from a bad relationship between the brothers, partly because of bad Danish finances thanks to the Nordic Seven Year War). I had some ideas
here.
One of the good PODs are that much of the Danish fleet are not lost in a storm. Likely we see Sweden being starved to surrender. So Denmark gain Estonia and Elfborg (Göteborg), Magnus are still adminstrator of the Bishopric of Ösel. Like in OTL the Livonians and Cours seek protection against Poland-Lithuania and in the 1570ties elect Magnus as King, like in OTL he receive support from the Russians and with Frederik II in a better position to support his brother. So we end up with Danish-Polish war, with the Russian joining the Danish side and the Swedes stay neutral. While the Poles are strong the Danish postion are stronger because their dominans of the Baltic, so the War end with Magnus end up of King of Livonia (which includes Courland). Magnus died young and childless in OTL so let imagine he do here too (a little unlikely but not much so especially because his brother died young too). Frederik II are crowned King by the Livonians whom still fear the Poles of course we have the problem that Frederik dies a few year later, but with Estonia and Ösel being the Danish king personal possesions, they choose to keep it united under Christian IV.
Denmark was in a much better position than Sweden and fully able to protect their Baltic possesion for decades in OTL, I see no reason why a weaker Sweden will change that, through Denmark likely will enter the Swedish side in the "disagreement" between the Polish and Swedish Vasas. Which will gforce Denmark to strenghten its position in East Baltic and including seeking complete naval dominans of the Baltic. The big problem are the growth of Russia, which will be challenge to Danish control of Livonia.