"My pleasure" in generally used as a response to being thanked. Thus you would not generally use it to initiate an expression of thanks. Its equivalent in other words is "you're welcome".
- Interviewer: "We thank you, Mr. Smith, for coming in to speak with us today."
- Mr. Smith: "My pleasure!"
However, you might conclude a formal talk or presentation using "my pleasure":
"It has been my great pleasure to visit with you today and speak of
this fascinating subject! I hope that we may do so again soon!"
In that case it isn't being used in the sense of giving thanks so much as a simple expression of pleasure.
As to giving it a negative connotation, this would have to be conveyed by tone of voice and/or mannerism, since the phrase has no native negativity associated with it.
Note that I said above that you don't generally use it as an expression of thanks. However, exceptions in English abound, so it might not be entirely out of place in some circumstances to use it to thank someone. I'd have to say that it would be unusual to do so, however.