You can cancel the I-485 in writing by sending a letter stating that you want to withdraw it, with a copy of the I-485 receipt notice attached. Or you can show up at the interview alone and ask to withdraw -- that is a cleaner way to do it because you'll know an official directly involved with your case has seen/heard the withdrawal request.
You said your F-1 visa expired, but has your F-1 status also ended? Have you been attending* classes and otherwise complying with the requirements of the F-1? Or did you already leave school before filing for the I-485? Did you use the employment card obtained through the I-485 to work?
Your answers to the above would affect whether you can continue to stay in the US and study after withdrawing the I-485, and whether you can obtain another student visa in the near future or otherwise return to the US legally.
Given how short-lived your marriage is, if you're going to end it now I suggest you try for annulment instead of divorce. If it is processed as an annulment and not a divorce, that would enable you to claim that you've never been married for most legal purposes (but not US immigration, as they expect you to admit that you've been married before and list the annulled marriage(s)).
*or registering for next semester's classes, if you were not attending classes in the summer