Apart from reflashing the software completely I think you've done all you can do yourself. Repair is the only other option.
Reflashing is done using a ROM Update Utility (RUU). These will check the phone id to ensure it is the right software for the phone, so in order to find an RUU for you we'd need to know the software version, what country it was bought in and whether it was bought through a mobile carrier (who would usually have their own build of the software) and if so, which. You'd then need a Windows PC to run it.
When you say it just happened, have you ever modified the software (e.g. rooting the device), or made any changes (e.g. updates) before it happened? In those cases it is more likely to be software, i.e. user-fixable. If it was truly spontaneous then a hardware failure is more likely (especially if it has ever got wet), in which case repair or replacement will be your only options.