Hi @Kily
Sorry to hear that you are getting divorce. I must assume that you guys have try to make it work but it didnt...Its a good decision to withdraw the application since continuining will be a case of missrepresentation.
So hey, I found this link for you:
http://www.cic.gc.ca/english/helpcentre/answer.asp?q=732&t=14
Is straight from CIC about withdrawals. It will help you to write the letter and follow up the process.
Hope this works...
Good luck, and God bless!