As soon as you know you are no longer going to be able to participate in GSOC please withdraw from the program by going to your GSoC dashboard and your profile and hitting the withdraw button.
If you withdraw after May 6 then the organization loses that student slot and another student will not be able to fill the slot so that means one less student can be a part of GSoC. That is particularly devastating for orgs with only 1 or 2 students that are being selected.
But if you can withdraw prior to May 6 the orgs can choose another student to replace you (if you are one of their selected students).