If you have a modern phone, the data on it should be protected by strong encryption that would be very difficult to break. It's very time consuming and expensive ($1.3m in one case) to crack a strong encryption algorithm, so it's something they only do if it's a high stakes case, for example active terrorism investigation or a kidnapping case where they still hope to rescue the victim.
Your online data is probably easier to access, depending on the laws that apply in your jurisdiction. Law enforcement can get an order from the judge compelling the online providers to disclose relevant information from your account. If you have any information you absolutely want to remain secure, you'd have to delete it online as well as on your phone.
Any efforts to access your data by law enforcemet will cost them time, money and energy, so they aren't likely to do any more than the mininum needed to do their job and close the case. If it's an apparent suicide they will be collecting evidence to make sure it's not a disguised murder, and the medical examiner will collect evidence to confirm it's a suicide. Since there wouldn't be any criminals on the loose or crime to investigate, they wouldn't be likely to put much effort into accessing your personal data.