privacy – How to donate a computer without jeopardizing personal information?

I have an old computer that is no longer working and I want to donate it or perhaps throw it in the trash. However, I don’t want people to potentially get my banking account data, usernames/passwords I have entered on the computer, software installed, legal or medical documents, internet browser data, etc. Besides keeping the hard drive, should I do something more before getting rid of the computer?

Thanks in advance.