"Self registration" (Regsvr32, Regasm, GACUTIL, InstallUtil et al) is not considered a best practice in Windows Installer because it runs out of process, isn't declarative and isn't transactional. It defeats Windows Installers knowledge of the changes being made to the target machine, is slower, often fragile and often breaks in repair, upgrade, downgrade, rollback et al scenarios.
The alternative is to "harvest" or "extract" the COM metadata associated with your assembly and author them natively into your MSI. How you do this exactly depends on what tool you are using to author your MSI. InstallShield has a setting called ".NET Com Visible" and WiX has a feature called "Heat". A more raw approach is to run the command regasm foo.dll /regfile:out.reg and then author the contents of the regfile into your installer by hand substituting the paths with MSI directory properties.
There is one catch with regasm /regfile as documented on the regasm topic in MSDN:
Note that the .reg file does not contain any registry updates that can
be made by user-defined register functions.