Affair with teacher may have driven 17-year-old to attempt suicide