Deductions & credits

First, you can't reimburse yourself for any expense unless the expense was incurred after the date of the opening of the HSA. 

Then, if you took an itemized deduction for medical expenses last year and included the COBRA premiums, you will have to make an adjustment on this year's tax return (you report a taxable recovery, or reimbursement of  a previous deduction.)  The amount of adjustment may not be obvious without a calculation we can tell you if you have to do it.

And your contributions IN to the HSA for 2018 are still limited by either the personal or the family limit (plus the over-55 catchup provision if that applies to you).

Taking those factors into account, it is perfectly acceptable to deposit money in the account to qualify for the tax deduction then immediately withdraw it to reimburse yourself for a past medical bill.