Sometimes we mouth words of prayer at appropriate times without any thought whatsoever. When we are formalistic, we, like any legalist, can tell ourselves we have prayed several times that day, so all is well. Whether there is any personal reality to our prayer lives is another question. Escaping formalistic thinking is not always an easy matter. Changing the forms we operate under can give us an opportunity to reevaluate our outlook, but it won't solve the problem.
Any form can become formalistic.
We may pray very contemporary prayers at odd times and in strange ways but still be as formalistic as ever. This is because what matters is not the forms, but how we view those forms. The main thing to do when we realize we are relating to God formalistically is to repent and set out to immediately reestablish personal rapport with him at that moment. I find that corporate prayer helps me avoid formalism. By joining into the thoughts of others, and by sharing my prayers with others, I seem to be able to focus my attention for longer periods of time.