If your case is pending before the IJ and ICE is in possession of your passport, you could certianly ask the IJ to permit you to withdraw your application for admission and perhaps allow you to depart the US under an order of voluntary departure (VD). Once you were to have the IJ's case resolved, you could then go to ICE and let them know of your plans to leave. This woudl likely require the purchase of a ticket and coordination with ICE and the ISAP folks to see that their end of matters is resolved correctly and without any loose ties being left behind. Keep in mind that if you do depart under these circumstances, the likelihood of returning in the immediate future is quite low. So ponder the consequences seriously before deciding how to proceed. Good luck.