An idiomatic phrase for this is “to my shame”. One might also say “To my discredit, I did ...”. Alternately, consider “Regrettably”, “Sadly”, or “Unfortunately” in place of a “To my ... phrase. These latter three forms are more general and less personal, which is suitable unless you wish to place blame or credit on someone. “Regrettably” seems like a good choice.
The rest of this answer considers, via Google Ngrams, historical incidence of “To my ... phrases. While ngram statistics are not gospel truth (due to confounding with out-of-context searched phrases) they are the most righteous data easily available.
A Google Ngrams for six phrases (see below) shows that to my shame has appeared in print 3 to 4 times more frequently than the next most frequent phrase.
The six phrases treated in the link above are to my shame, to my detriment and to my discredit, plus those phrases with To instead of to.
The Google Ngrams picture shown below covers a shorter period than the first Ngrams link, making it easier to interpret.
Another useful Ngrams covers the phrases my detriment, my shame, my discredit, my sorrow, my chagrin.