The procedure is this:
Pull the relief valve on the keg just prior to connecting the CO2 in order to vent any excess pressure and ensure that the serving pressure will be correct. THEN close the relief valve and tap the keg. Make sure the CO2 tank valve and petcock are open, and leave them open. If required, adjust the regulator to the desired serving pressure as the keg begins pressurizing.
Your keg is not ruined. Chill it and keep it under pressure, and it will recover in a few days (as mentioned in the above post).