Can I consider Allah as my friend?
In the Quran God calls Himself the mawlā of the believers (8:40 and elsewhere), which is usually translated as “protector”. But it actually also means “friend”, “companion”, “supporter”, “master”, “chief”. So it contains all of these meanings.
However, in modern usage “friend” implies that the person is equal in status to you, which naturally does not apply to God. So God can be a friend in that He is our companion in life, that He supports us and cares for us. But He is not just a friend, He is also a master and a mentor, so focusing only in His being a friend leads to a biased understanding.