Both options are OK. "in spite of" is a prepositional phrase which, by definition, must be attached to a noun. In the first sentence, the noun is "this" and in the second, the noun is "not feeling well" (a gerund phrase).
"but" is a conjunction and so has a different function in a sentence to "in spite of". "But" joins two independent clauses here whereas there is only one clause in the second one.