HID Compliant MIDI USB Device Using Arduino Mega2560 - WORKING!

You may have to restore the Arduino bootloader to your board, here’s a guide: Restoring Arduino MEGA Bootloader, it’s using Atmel Studio, but the same principle can be applied using alternative methods, like flashing via avrdude, but you’ll have to use some sort of an external programmer (if you have another Arduino board that works, it can be used to program other MCUs by using Arduino ISP)