To dispose of a computer or computer equipment safely and in an environmentally responsible manner, back up and then destroy all data, then either donate, sell, repurpose or recycle the equipment. You can ask the computer supplier for assistance. Some suppliers can recommend educational or social foundations where you can donate the equipment, or recycling facilities.
To back up your data, you can use an external drive, a backup application or an online backup tool. Some free online backup tools are IDrive, Google Drive and OneDrive.
In order to destroy all data on a hard drive, you can use a data destruction software, like Darik's Boot and Nuke or CBL Data Shredder. Alternatively, you can physically destroy the hard drive and make sure the circuit board and the chips are smashed. Use a hammer, axe or drill. This step is important so your sensitive data, such as financial or personal information, cannot be recovered. It is not enough to delete the files and empty the recycle bin.
If the computer equipment can still be used, consider donating it to an educational facility, or selling it second-hand. Also, you can keep it and use it for parts.
Some recycling centers have been known to dump toxic electronic waste in developing countries. You can ask your local recycling centers how they dispose of toxic e-waste. Alternatively, find centers that are certified as e-stewards -- a recycler certification for responsible e-waste disposal -- on E-Stewards.org.