Open UDB. File > Open Map. Browse to your Doom folder and select doom.wad. You'll then be presented with a popup window asking you to pick a map and game configuration. Pick your desired configuration (eg 'Doom: doom (doom format)') and click your map (in your case E1M2). And voila, you can edit that map.
If you want a configuration other than 'doom format', you need to open the map in doom format first and convert it later to your desired format. This doesn't always go fully automatic, especially to UDMF format.