So it sounds like you tried most things. If it's not a hardware issue then maybe this will help.
Insure the BB can be detected by the PC in the USB port. If not try a different port.
Make sure the BB OS is for your model and is installed on the PC in the default location.
Insure the Desktop Manager is working and loads.
Plug in the BB to an AC source while working.
Perform a wipe if you can. ( password tries more than 10)
check to see if the BB will load.
Error 507 indicates there are no applications on the phone.
This link offers some additional info. Keep in mind this all assumes no hardware problems.
If the BB was dropped or subject to ANY moisture, wierd things can happen as with any smartphone.
KB02792-BlackBerry smartphone displays Error message “507” when upgrading BlackBerry Device Software