It did not try to commit suicide.
It is more probable it was in a scared situation and your window was not seen.
If, by any chance, indeed it tried to end its own life, it means something was mentality (illness, drugged, etc.) or physically malfunctioning.
There is a very low probability, that it is in any way, related to your actions. I find that hard to believe based on your question.
If the robin was a typical alcoholic, it would testify that it was flying along, minding its own business, when suddenly a window leapt out in front of it and collided with it. It's all the window's fault.
Or, perhaps we could make the same traffic ticket refutation that Reverend Robert Schuller made? It was Satan that reached out and grabbed the robin and slammed him into a window.