No, it is not a mortal sin. If you had reasonable cause to kill the spider (as distinguished from killing a living creature just for the fun of it), then you did not even sin at all.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.