Dialabrain is correct -- Dropbox files are backed up by Time Machine, as long as they are "available offline," e.g. are physically downloaded and present on the Mac in local storage. However the files that are 100% stored in the Dropbox cloud are not backed up by Time Machine.
Also note: some programs like SuperDuper, that make "clones" of your computer and files, do NOT backup the folder for Dropbox files, which is currently inside user/Library/CloudStorage. There are various reasons for that, but as I understand it, inconsistent results can occur when that folder contains a mixture of "only in the cloud files" and "physically on the Mac" files. Others, like CCC, can backup that folder with some limitations, as explained in the CCC documentation.
The slow behavior of your Mac probably has nothing to do with Dropbox. In fact, by deleting your Dropbox files, you greatly simplified (unintentionally) the sync which can use lots of computer resources.
Depending on your Dropbox plan, you still may be able to recover the deleted files. My plan allows for recovery of deleted files within 30 days. Other plans permit this for up to one year after deletion. Even if your plan does not provide for this, or if you have exceeded the time limit, contact Dropbox as they can help recover files in situations like this.