Formspree is not an SMTP server. It’s a server-side service that gets form data, and send an email with that data to someone, maybe by using Mailgun behind the scenes.
Basically you need to replace that service, to send emails with contact form with your Mailgun account. If you ask if Ghost has something like that, the answer is no.
The challenge about contact form is not the sending email. It’s everything before that step. How to accept a form, how to avoid spam, how to rate limit mails to avoid intentional or unintentional multiple mail sendings, etc. These are the issues that Formspree (or similar services) solves.