Both spiders and mice depend on their sense of smell to navigate your house, but peppermint's strong menthol scent masks their olfactory abilities and forces them to avoid it.
Figure out the entryways of mice and spiders into your home before brewing peppermint tea. Then, place the used teabags in those entry points to deter the pests.
Alternatively, fill the peppermint tea you brewed into a spray bottle and spritz the problematic areas. Just remember to replenish the smell on a frequent or daily basis.