I'm relieved thinking you'll keep the secret for me.

Literal

Secret [object-を] keep [for me-てくれる] [quotative-と] think relief-doing.

~てくれる marks the action as a favor done for the speaker. ~と思い is the conjunctive form of ~と思う, linking the thought to the feeling. 安心している means 'to be relieved, at ease.'