Catalysis of the reaction: a 2-hydroxy fatty acyl-CoA = a fatty aldehyde + formyl-CoA. The reaction acts on 2-hydroxy-3-methyl-branched fatty acyl-CoA and 2-hydroxy-long-chain fatty acyl-CoA.
2-hydroxyacyl-CoA lyase activity