Peter Sarsgaard opens up about his "near miss" with opiates