Under IEC rules a mains applicance that does not have a ground (earth) connection is a class II appliance, a.k.a. 'double insulated'. This means that any mains conductors must be protected by either two layers of suitable insulation, known as 'basic' and 'supplementary' insulation, or by 'reinforced' insulation.
If you can construct your appliance using a power supply unit that qualifies by itself as class II equipment - i.e. it would be safe and legal to use outside the metal enclosure - then I believe (though IANAL) you can also install that PSU inside a metal enclosure to make a piece of equipment that also counts as class II. Of course you can't interfere with the mains wiring to that PSU in any way, so you would have to either route the intact mains lead through a cutout in the case, or have a cutout allowing a mains lead to be plugged in to the PSU's mains inlet. Also of course, you need to follow good practices for strain relief of cables, protecting them from sharp edges etc, and be aware that heat dissipation inside a case will not be as good as in free air.
If you are OK with having a class II power supply outside your equipment, this is also a safe option and I think means your equipment then classifies as class III, although I haven't seen this symbol on common devices that do use class II external power supplies so it's possible it only applies when the extra-low-voltage power supply is a fixed installation.