As far as I know there is no pre configured gamepad button combination that will gring you back to the main menu. I think you have to go into the config files of the emulators you are using and set up those combinations yourself. For Retro Arch you can add a line the following lines to the config file in RetroPie/configs/all
input_enable_hotkey_btn = "8" input_exit_emulator_btn = "9"
This will allow you to close out of the emulator when you hold the Back Button (button 8) and press the Start Button (button 9).
If you are using gpSP you can load the emulator without a game (go to the folder that holds the gpsp script and type ./gpsp) This gives you options to change your gamepad button configuration as well as enabling a preset button combination to close out (select and right trigger I believe)
As of yet I haven’t used any of the other emulators yet so I haven’t looked into their specific configs.
Hope this helped