In space, assuming you're not too far out, heat is abundant. Literally just put the ice in an insulated room with a window facing the sun. If you want to get fancy, use mirrors to focus the sunlight.
This sounds wrong. Firstly, it is generally around -450 degrees F in space (not toward the sun obviously), and to get that asteroid to continuously point toward the sun on one side is probably not gonna happen, and then that "insulated room" built on the asteroid is exorbitantly expensive by itself if it is of any consequential size, and finally, it is impossibly expensive (from energy cost to time cost to equipment cost) to 'mine' that ice from the asteroid. It ain't just sitting out there in cubes... (not to mention there aren't any asteroids hanging out around the Earth anywhere close, so you WILL be far away)