The police determined it was suicide based on the contents of the note.
遺書 is any final written message left by someone who has died, including personal letters and suicide notes. A will in the legal sense, dealing with property, is 遺言 or, formally, 遺言書 (lawyers read 遺言).