there are many threads on engine swaps.
We do not have enough control over the LS's PCM to make a change this big - we cannot change cam or crank rotation counts, ..etc.
So you would have to bring the mustang's PCM with the engine. however, the PCM will not interface with the rest of the LS's 6 computers (FEM, REM, PATs, Dash Cluster, driver door, TC, ...ewtc) - so you'll basically have to gut the LS's wiring and put in the mustang's - including dash, PATs, .... The LS is the only Ford with the FPDM integrated into the REM.
This is not an easy or cheap job - but doable. now a company like SCT could probably modify the PCM at the low levels to do this - but it would be a custom R&D job and be very expensive.
you would also need to re-work the cooling system as the stock LS system is very near the edge of performance with the 3.9.
The extra weight of the 4.6+trannie would make you visit the car's balance, and since we cannot adjust camber,... you may have an issue there. THere are no aftermarket anti-sway bars - so if you have messed the balance up alot - your understeer may just be something to live with.
So it's doable - just not the wisest investment for the $$$