Override Form.Dispose(bool) in your form, and dispose of your object there.
In order to understand how this works, you can refer to MSDN's page on Implementing a Dispose Method. The Form class follows this pattern, which allows you to override Dispose(bool)
in subclasses. (Just make sure to call base.Dispose(disposing)
correctly in your override, as well.)
If you aren't comfortable moving this from the .designer.cs file into your main .cs file, the other option is to subscribe to your own FormClosed event, and dispose of your resources in that event handler. MSDN recommends this approach - from the docs for FormClosed:
You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form.