The phrase 'foolish of me' is correct and usable in written English. You can use it when you want to highlight a mistake or bad choice that you have made. For example, "It was foolish of me to leave my bag unattended, I should have been more careful.".
It's so foolish of me.
How foolish of me to think otherwise.
It is foolish of me to think of it as quintessentially Pakistani.
If I do really well at the Olympics it would be foolish of me to stop throwing the discus".
I guess there's a simplistic foolish part of me that believes that if Athena had only had a workshop like ours she would never have quit.
Deciding on a course of action that could put so much of the rest of my life at risk seemed nothing short of foolish to me.
It has always seemed kind of foolish to me.
Ludwig does not simply clarify my doubts with English writing, it enlightens my writing with new possibilities
Simone Ivan Conte
Software Engineer at Adobe, UK