For a heat pump to pull heat from the outside air the temperature of the coils have to get colder than the outside air. With the air so close to freezing that means it is highly probable for the moisture in the air to condense and freeze to the coils. The thermostat should be smart enough to figure out that the outdoor temperature is too low for the heat pump and switch to auxiliary heat and/or know to run through a defrost cycle to prevent ice buildup. It sounds like you need a new thermostat.
When the thermostat in my house died I found out that a thermostat that could properly manage defrost and/or automatic switching to aux heat were rare and expensive. By "expensive" I mean something around $500 when a typical mechanical thermostat is $30 and an electronic thermostat with Wi-Fi and a phone app costs $100. I called some HVAC people about installing a new thermostat like my old one and most didn't even know what I was talking about (I guess air sourced heat pumps are not popular around here) and the one HAVC guy that did know what I was talking about had only one model of thermostat and quoted an install (parts and labor) in the $500 range.
I'm guessing the people that installed this was not aware icing could be a problem, or they knew it was possible but gambled on the cheaper thermostat. It is quite possible that there is some other problem which makes this icing problem worse, and @longneck discussed them in another answer. Whatever the case this should not happen because a thermostat designed for air sourced heat pumps would prevent this.
A long term fix will almost certainly involve a new thermostat. In the short term you should be able to set your thermostat to use only aux heat. On my old thermostat it had different modes, one mode called either "aux heat" or "emg heat" would run only the auxiliary heat source for heat. The other options were "cool" (run heat pump in cooling only), "heat" (heat only but switch between heat pump and aux based on outdoor temperature), "auto" (heat pump, aux heat, or cooling, based on outdoor temp and desired indoor temp range), and "off".
My heat pump is rated to operate down to at least 20F, and from your comments I assume yours is as well. If the heat pump ran before in temperatures this low and not ice up then either you had an unusually humid weather event or something broke. I could not find a replacement for my thermostat at a price I was willing to pay, you may have better luck in your area as it sounds like air sourced heat pumps are the norm in your neck of the woods.
I ended up bypassing the heating function of my heat pump and used a "cheaper" (about $100) thermostat. I haven't decided if this will be a permanent fix. I have natural gas heat and the season where an air sourced heat pump makes sense where I live was already quite short when I bought it, with natural gas prices getting lower since that time I'm not facing any extra costs by using only the natural gas heat.
I realize that running on electric resistance heat would cost you money so consider ways to minimize the time it's needed. If the outdoor temperature is above 40F then it may be safe to use the heat pump. Perhaps you can use the heat pump during the day and aux heat at night. If you have some electric space heaters then consider using them, if you will be using electric resistance anyway until this is fixed then heat only the rooms you need until then.
I stressed the need for a proper thermostat because it seems that even many HVAC installers don't know air sourced heat pumps need thermostats designed for them. Ground source heat pumps can't ice up like air source heat pumps and so there's no need for frost protection on those. When you can get a tech out to look at your heat pump then it may be wise to ask about the thermostat if the tech doesn't bring it up first.