You can simply disable the bootloader rather than erasing it. Find out the current fuse settings using a fuse-detection program. Change the BOOTRST flag in the High fuse to be unchecked, referring to this page: Engbedded Atmel AVR® Fuse Calculator
Write the High fuse back. Then it will ignore the bootloader and go straight to your code. Of course, to upload a new version you will have to put the BOOTRST fuse back, or you won't be able to use the bootloader to upload a new sketch.
One way of changing the fuse is to use my Atmega chip stand-alone programmer sketch. This has an interactive "change fuses" option. To run this you just need a spare board (eg. a Uno) and 6 wires to connect the programming board to your target Mega2560.
Example wiring shown on the linked page. Note that you do not need the SD board to merely change fuses. Just the two Arduinos and the connecting wires are enough for that.
When you first run the sketch it should inform you of the current fuses. Look at the High fuse and follow my instructions above.
You should see something like this:
Entered programming mode OK.
Signature = 1E 98 01
Processor = ATmega2560
Flash memory size = 262144
LFuse = FF
HFuse = D8
EFuse = FD
Lock byte = FF
Bootloader in use: Yes
In this case the High fuse was D8, which has the bootloader enabled. Using the Fuse Calculator site we can see that it should now be D9 which disables the bootloader.
An alternative way to change the fuse is to use Avrdude, if you have a stand-alone ISP programmer handy.